include/o3tl/lru_map.hxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6b01a0b7cb6e5b090c7e84539cf936306f1b27c8
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Thu Dec 21 14:32:34 2023 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Dec 21 17:13:28 2023 +0100

    std::list::size() can still be implemented as std::distance()
    
    seen with Red Hat Developer Toolset 10
    
    https: 
//github.com/CollaboraOnline/online/issues/6893#issuecomment-1866342284
    Change-Id: I4a0e8ad028126dded678e971a6261d6725a6b06c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161129
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx
index 7e046fd1dbda..447cfcdaac86 100644
--- a/include/o3tl/lru_map.hxx
+++ b/include/o3tl/lru_map.hxx
@@ -116,7 +116,7 @@ private:
         else
         {
             // This must leave at least one item (it's called from insert).
-            while (this->mCurrentSize > mMaxSize && mLruList.size() > 1)
+            while (this->mCurrentSize > mMaxSize && mLruMap.size() > 1)
                 removeOldestItem();
         }
     }
@@ -127,7 +127,7 @@ private:
         if constexpr (!std::is_void_v<ValueSize>)
         {
             // This must leave at least one item (it's called from insert).
-            while (this->mCurrentSize > mMaxSize && mLruList.size() > 1)
+            while (this->mCurrentSize > mMaxSize && mLruMap.size() > 1)
                 removeOldestItem();
         }
     }
  • core.git: include/o3tl Caolán McNamara (via logerrit)

Reply via email to