diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2023-03-07 20:40:10 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2023-03-07 20:40:10 +0100 |
commit | a179db209ba347209682b19298f5c4d4b4d4a5c7 (patch) | |
tree | d1b32a8ba903504e74cd1e269468d04bb240fe6c /src/hashutil.cpp | |
parent | b3c3e7998c6497f8d354da77c7ed6184381c6247 (diff) | |
download | ccache-a179db209ba347209682b19298f5c4d4b4d4a5c7.tar.gz |
refactor: Improve InodeCache::get signature
Diffstat (limited to 'src/hashutil.cpp')
-rw-r--r-- | src/hashutil.cpp | 6 |
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 |