diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-18 21:47:51 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-18 21:47:51 +0000 |
commit | 0a62eb9bdccf5c6b1e83b7f025859e4ca005f4f2 (patch) | |
tree | 51b3c8113b250f97ee7c6416807a430466c8e284 /plugins/updater/common.cpp | |
parent | e328df9bdc816810545b91dccd52e7741e962dc0 (diff) |
goodbye updater
git-svn-id: http://svn.miranda-ng.org/main/trunk@58 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/updater/common.cpp')
-rw-r--r-- | plugins/updater/common.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/plugins/updater/common.cpp b/plugins/updater/common.cpp deleted file mode 100644 index f7b240bbf6..0000000000 --- a/plugins/updater/common.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "common.h"
-
-UpdateList::UpdateList(): count(0), head(0), tail(0) {
-}
-
-UpdateList::~UpdateList() {
- clear();
-}
-
-UpdateList::UpdateList(UpdateList &source): count(0), head(0), tail(0) {
- for(source.reset(); source.current(); source.next())
- push_back(*source.current());
-}
-
-void UpdateList::clear() {
- Node *current;
- while(head) {
- current = head;
- head = head->next;
- delete current;
- }
-
- count = 0;
- head = tail = 0;
- reset();
-}
-
-int UpdateList::size() {
- return count;
-}
-
-void UpdateList::reset() {
- it_current = head;
-}
-
-void UpdateList::erase() {
- if(it_current) {
- if(head == it_current) head = head->next;
- if(tail == it_current) tail = tail->prev;
-
- if(it_current->next) it_current->next->prev = it_current->prev;
- if(it_current->prev) it_current->prev->next = it_current->next;
-
- delete it_current;
- count--;
- reset();
- }
-}
-
-void UpdateList::next() {
- if(it_current) it_current = (Node *)it_current->next;
-}
-
-UpdateInternal *UpdateList::current() {
- return (it_current ? &it_current->ui : 0);
-}
-
-void UpdateList::push_back(UpdateInternal &update) {
- if(tail) {
- tail->next = new Node;
- tail->next->prev = tail;
- tail = tail->next;
- } else {
- head = tail = new Node;
- }
- tail->ui = update;
- count++;
-}
-
-UpdateInternal &UpdateList::back() {
- return tail->ui;
-}
|