Parcourir la source

Merge topic 'enum_set-stabilization'

f42d0c9322 cm::enum_set: fix compilation warning

Acked-by: Kitware Robot <[email protected]>
Merge-request: !7222
Marc Chevrier il y a 3 ans
Parent
commit
bbb51444a2
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      Utilities/std/cmext/enum_set

+ 5 - 1
Utilities/std/cmext/enum_set

@@ -58,7 +58,11 @@ public:
 
   enum_set_iterator& operator--()
   {
-    while (--this->Index >= 0 && !this->Set->test(this->Index))
+    if (this->Index == 0) {
+      return *this;
+    }
+
+    while (!this->Set->test(--this->Index) && this->Index != 0)
       ;
 
     return *this;