1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

queryPathInfoUncached(): Return const ValidPathInfo

This commit is contained in:
Eelco Dolstra 2018-09-25 18:54:16 +02:00
parent 992a2ad475
commit e5319a87ce
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
12 changed files with 22 additions and 22 deletions

View file

@ -258,7 +258,7 @@ protected:
struct State
{
LRUCache<std::string, std::shared_ptr<ValidPathInfo>> pathInfoCache;
LRUCache<std::string, std::shared_ptr<const ValidPathInfo>> pathInfoCache;
};
Sync<State> state;
@ -361,12 +361,12 @@ public:
/* Asynchronous version of queryPathInfo(). */
void queryPathInfo(const Path & path,
Callback<ref<ValidPathInfo>> callback) noexcept;
Callback<ref<const ValidPathInfo>> callback) noexcept;
protected:
virtual void queryPathInfoUncached(const Path & path,
Callback<std::shared_ptr<ValidPathInfo>> callback) noexcept = 0;
Callback<std::shared_ptr<const ValidPathInfo>> callback) noexcept = 0;
public: