booleanvector: Use isempty() instead of size()==0
[libstick.git] / include / libstick-0.1 / booleanvector.h
index d7eb41bc9d7bc43109b964d20c67547f17dafa89..5d8706320766ea74b970bf10ae28373c4ba31814 100644 (file)
@@ -251,8 +251,11 @@ class heapsorted_boolean_vector {
 
         /** Returns true if vector contains no 1. */
         bool isempty() const {
-            strip_heap();
-            return isheap ? heapsize==0 : array.size()==0;
+            if (isheap) {
+                strip_heap();
+                return heapsize == 0;
+            } else
+                return array.size() == 0;
         }
 
         /** Print this vector */