]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix -Wsign-compare warnings in bits/hashtable_policy.h
authorJonathan Wakely <jwakely@redhat.com>
Thu, 12 Dec 2024 21:07:08 +0000 (21:07 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 12 Dec 2024 21:09:47 +0000 (21:09 +0000)
libstdc++-v3/ChangeLog:

* include/bits/hashtable_policy.h (_Local_iterator_base): Fix
-Wsign-compare warnings.

libstdc++-v3/include/bits/hashtable_policy.h

index f2260f3926dca901f50b7d99df8b2701e8f50295..6769399bd4d34dd139536cccfcf235312814160e 100644 (file)
@@ -1302,12 +1302,12 @@ namespace __detail
       _Local_iterator_base&
       operator=(const _Local_iterator_base& __iter)
       {
-       if (_M_bucket_count != -1)
+       if (_M_bucket_count != size_t(-1))
          _M_destroy();
        this->_M_cur = __iter._M_cur;
        _M_bucket = __iter._M_bucket;
        _M_bucket_count = __iter._M_bucket_count;
-       if (_M_bucket_count != -1)
+       if (_M_bucket_count != size_t(-1))
          _M_init(*__iter._M_h());
        return *this;
       }