diff options
Diffstat (limited to 'plugins/Ping/src/collection.h')
-rw-r--r-- | plugins/Ping/src/collection.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/plugins/Ping/src/collection.h b/plugins/Ping/src/collection.h index e19c5874d4..df6fff15c2 100644 --- a/plugins/Ping/src/collection.h +++ b/plugins/Ping/src/collection.h @@ -155,19 +155,16 @@ public: virtual const bool pop(T &val)
{
- if (!head) return false;
+ if (!head)
+ return false;
ListNode<T> *n = head;
- if (head) {
- head = head->next;
- if (n == tail) tail = nullptr;
- val = n->val;
- delete n;
- Collection<T>::count--;
- return true;
- }
- else
- return false;
+ head = head->next;
+ if (n == tail) tail = nullptr;
+ val = n->val;
+ delete n;
+ Collection<T>::count--;
+ return true;
}
};
|