From 385f72f9dc0e799f5375b6ab315b4dd549ba5b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gr=C3=A9goire?= Date: Sat, 11 Oct 2025 14:13:33 +0200 Subject: [PATCH] Rename ImageCache::Contains to ContainsImage The name was a bit misleading as it could be mistaken to mean "The cache contains the address" and not as "has an image with this start address". ie: that it could be mistaken to do GetImageForAddress( startAddress ) != nullptr. --- public/client/TracyCallstack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp index aea58dd7..e046001a 100644 --- a/public/client/TracyCallstack.cpp +++ b/public/client/TracyCallstack.cpp @@ -157,7 +157,7 @@ private: ImageCache* cache = reinterpret_cast( data ); const auto startAddress = static_cast( info->dlpi_addr ); - if( cache->Contains( startAddress ) ) return 0; + if( cache->ContainsImage( startAddress ) ) return 0; const uint32_t headerCount = info->dlpi_phnum; assert( headerCount > 0); @@ -186,7 +186,7 @@ private: return 0; } - bool Contains( uint64_t startAddress ) const + bool ContainsImage( uint64_t startAddress ) const { return std::any_of( m_images.begin(), m_images.end(), [startAddress]( const ImageEntry& entry ) { return startAddress == entry.m_startAddress; } ); }