Fix warning for usage of out->size() in _void_dequeue(). Use empty()
since it should be prefered as it has, following the standard, a
constant time complexity regardless of the containter type. The
same is not guaranteed for size().
warning from cppchecker was:
[common/WorkQueue.h:97]: (performance) Possible inefficient
checking for 'queue' emptiness.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
void *_void_dequeue() {
list<T*> *out(new list<T*>);
_dequeue(out);
- if (out->size()) {
+ if (!out->empty()) {
return (void *)out;
} else {
delete out;