diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-14 16:38:43 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-14 16:42:03 -0500 |
commit | b3d91239ae9f21a60057b278ceeff663fb786246 (patch) | |
tree | e5c910beda88a280b197d27cc269595d667d988b /src/libstore/content-address.cc | |
parent | 056cc1c1b903114f59c536dd9821b46f68516f4e (diff) |
Make `ValidPathInfo` have plain `StorePathSet` references like before
This change can wait for another PR.
Diffstat (limited to 'src/libstore/content-address.cc')
-rw-r--r-- | src/libstore/content-address.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc index 3b8a773b7..a98e34cb8 100644 --- a/src/libstore/content-address.cc +++ b/src/libstore/content-address.cc @@ -151,6 +151,16 @@ Hash getContentAddressHash(const ContentAddress & ca) }, ca); } +bool StoreReferences::empty() const +{ + return !self && others.empty(); +} + +size_t StoreReferences::size() const +{ + return (self ? 1 : 0) + others.size(); +} + ContentAddressWithReferences caWithoutRefs(const ContentAddress & ca) { return std::visit(overloaded { [&](const TextHash & h) -> ContentAddressWithReferences { |