about summary refs log tree commit diff
path: root/src/fstate.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-08-20T14·11+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-08-20T14·11+0000
commit956801fcc2ac75fd4041f61619451d2935fa2598 (patch)
tree7eed97a30df7dc61bbc065a4921ee143d29f7291 /src/fstate.hh
parent624c48260f1b4eec86daa0da5f33d4cbb963a361 (diff)
* Use maps and sets in the FState data type. This ensures normalisation of
  slices and derivations w.r.t. order of paths, slice elements, etc.

Diffstat (limited to 'src/fstate.hh')
-rw-r--r--src/fstate.hh15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/fstate.hh b/src/fstate.hh
index e4f69cb232df..a7935be5250e 100644
--- a/src/fstate.hh
+++ b/src/fstate.hh
@@ -14,28 +14,25 @@ typedef list<FSId> FSIds;
 
 struct SliceElem
 {
-    string path;
     FSId id;
-    Strings refs;
+    StringSet refs;
 };
 
-typedef list<SliceElem> SliceElems;
+typedef map<string, SliceElem> SliceElems;
 
 struct Slice
 {
-    Strings roots;
+    StringSet roots;
     SliceElems elems;
 };
 
-typedef pair<string, FSId> DeriveOutput;
-typedef pair<string, string> StringPair;
-typedef list<DeriveOutput> DeriveOutputs;
-typedef list<StringPair> StringPairs;
+typedef map<string, FSId> DeriveOutputs;
+typedef map<string, string> StringPairs;
 
 struct Derive
 {
     DeriveOutputs outputs;
-    FSIds inputs;
+    FSIdSet inputs;
     string platform;
     string builder;
     Strings args;