summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2022-04-29 14:49:14 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2022-04-29 14:49:14 (GMT)
commitf42d0c932266cffa2d995ee950e628d7dcbff521 (patch)
tree74ba5026139e337030a58f97d4d2f639edca0ad4 /Utilities
parent253492a6f7d13827299abde07e10f47939a0855a (diff)
downloadCMake-f42d0c932266cffa2d995ee950e628d7dcbff521.zip
CMake-f42d0c932266cffa2d995ee950e628d7dcbff521.tar.gz
CMake-f42d0c932266cffa2d995ee950e628d7dcbff521.tar.bz2
cm::enum_set: fix compilation warning
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/std/cmext/enum_set6
1 files changed, 5 insertions, 1 deletions
diff --git a/Utilities/std/cmext/enum_set b/Utilities/std/cmext/enum_set
index f97a04c..4225b82 100644
--- a/Utilities/std/cmext/enum_set
+++ b/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;