From 8c59ea805a3a179b3f92023cfff1a9afb7056aec Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Wed, 23 Apr 2025 08:33:48 +0200 Subject: [PATCH] refactor: use `unordered_set::contains` to simplify check --- src/writer/categorizer/hotness_categorizer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/writer/categorizer/hotness_categorizer.cpp b/src/writer/categorizer/hotness_categorizer.cpp index 5e4a4a4f..9beeaa66 100644 --- a/src/writer/categorizer/hotness_categorizer.cpp +++ b/src/writer/categorizer/hotness_categorizer.cpp @@ -126,8 +126,7 @@ inode_fragments hotness_categorizer_::categorize( LOG_DEBUG << "hotness categorizer: checking path '" << rel_path << "' ('" << path.full_path() << "')"; - if (auto it = hotness_set_.find(rel_path.string()); - it != hotness_set_.end()) { + if (hotness_set_.contains(rel_path.string())) { fragments.emplace_back(fragment_category(mapper(HOTNESS_CATEGORY)), data.size()); }