summaryrefslogtreecommitdiff
path: root/src/hashutil.cpp
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2023-03-07 20:40:10 +0100
committerJoel Rosdahl <joel@rosdahl.net>2023-03-07 20:40:10 +0100
commita179db209ba347209682b19298f5c4d4b4d4a5c7 (patch)
treed1b32a8ba903504e74cd1e269468d04bb240fe6c /src/hashutil.cpp
parentb3c3e7998c6497f8d354da77c7ed6184381c6247 (diff)
downloadccache-a179db209ba347209682b19298f5c4d4b4d4a5c7.tar.gz
refactor: Improve InodeCache::get signature
Diffstat (limited to 'src/hashutil.cpp')
-rw-r--r--src/hashutil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hashutil.cpp b/src/hashutil.cpp
index f241903d..1b019f9e 100644
--- a/src/hashutil.cpp
+++ b/src/hashutil.cpp
@@ -187,9 +187,9 @@ do_hash_file(const Context& ctx,
check_temporal_macros ? InodeCache::ContentType::checked_for_temporal_macros
: InodeCache::ContentType::raw;
if (ctx.config.inode_cache()) {
- HashSourceCodeResult result;
- if (ctx.inode_cache.get(path, content_type, digest, &result)) {
- return result;
+ const auto result = ctx.inode_cache.get(path, content_type, digest);
+ if (result) {
+ return *result;
}
}
#else