summaryrefslogtreecommitdiff
path: root/src/InodeCache.hpp
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/InodeCache.hpp
parentb3c3e7998c6497f8d354da77c7ed6184381c6247 (diff)
downloadccache-a179db209ba347209682b19298f5c4d4b4d4a5c7.tar.gz
refactor: Improve InodeCache::get signature
Diffstat (limited to 'src/InodeCache.hpp')
-rw-r--r--src/InodeCache.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/InodeCache.hpp b/src/InodeCache.hpp
index eea3b49d..98276a34 100644
--- a/src/InodeCache.hpp
+++ b/src/InodeCache.hpp
@@ -25,6 +25,7 @@
#include <cstdint>
#include <functional>
+#include <optional>
#include <string>
class Config;
@@ -77,10 +78,8 @@ public:
//
// Returns true if saved values could be retrieved from the cache, false
// otherwise.
- bool get(const std::string& path,
- ContentType type,
- Digest& file_digest,
- HashSourceCodeResult* return_value = nullptr);
+ std::optional<HashSourceCodeResult>
+ get(const std::string& path, ContentType type, Digest& file_digest);
// Put hash digest and return value from a successful call to do_hash_file()
// in hashutil.cpp.