1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 04:01:47 +02:00

Do big rename to clean up code

- `PathReferences` -> `References`

- `PathReferences<StorePath>` -> `StoreReference`

- `references` -> `others`

- `hasSelfReference` -> `self`

And get rid of silly subclassing
This commit is contained in:
John Ericson 2023-01-06 15:36:05 -05:00
parent 9cfa78e58a
commit 46e942ff9e
16 changed files with 146 additions and 112 deletions

View file

@ -14,20 +14,22 @@ namespace nix {
class Store;
struct SubstitutablePathInfo : PathReferences<StorePath>
struct SubstitutablePathInfo
{
std::optional<StorePath> deriver;
StoreReferences references;
uint64_t downloadSize; /* 0 = unknown or inapplicable */
uint64_t narSize; /* 0 = unknown */
};
typedef std::map<StorePath, SubstitutablePathInfo> SubstitutablePathInfos;
struct ValidPathInfo : PathReferences<StorePath>
struct ValidPathInfo
{
StorePath path;
std::optional<StorePath> deriver;
Hash narHash;
StoreReferences references;
time_t registrationTime = 0;
uint64_t narSize = 0; // 0 = unknown
uint64_t id; // internal use only
@ -61,7 +63,6 @@ struct ValidPathInfo : PathReferences<StorePath>
return
path == i.path
&& narHash == i.narHash
&& hasSelfReference == i.hasSelfReference
&& references == i.references;
}