refactor: use unordered_set::contains to simplify check

This commit is contained in:
Marcus Holland-Moritz 2025-04-23 08:33:48 +02:00
parent b74d5d6f9a
commit 8c59ea805a

View File

@ -126,8 +126,7 @@ inode_fragments hotness_categorizer_<LoggerPolicy>::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());
}