about summary refs log tree commit diff
path: root/src/libstore/storeexpr.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-11-03T18·12+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-11-03T18·12+0000
commitcb7ccb528bbaeb30d09fbb41e57ab75d3121e1bc (patch)
treed27270a2b3c6abc86f56956d906899374778f028 /src/libstore/storeexpr.cc
parent4cbd845aa491b5cf534f8c031d285fc454933868 (diff)
* string2ATerm -> overloaded toATerm.
Diffstat (limited to 'src/libstore/storeexpr.cc')
-rw-r--r--src/libstore/storeexpr.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstore/storeexpr.cc b/src/libstore/storeexpr.cc
index 0b92be0e7117..8f5c5dea67e0 100644
--- a/src/libstore/storeexpr.cc
+++ b/src/libstore/storeexpr.cc
@@ -142,7 +142,7 @@ static ATermList unparsePaths(const PathSet & paths)
     ATermList l = ATempty;
     for (PathSet::const_iterator i = paths.begin();
          i != paths.end(); i++)
-        l = ATinsert(l, string2ATerm(i->c_str()));
+        l = ATinsert(l, toATerm(*i));
     return ATreverse(l);
 }
 
@@ -156,7 +156,7 @@ static ATerm unparseClosure(const Closure & closure)
          i != closure.elems.end(); i++)
         elems = ATinsert(elems,
             makeClosureElem(
-                string2ATerm(i->first.c_str()),
+                toATerm(i->first),
                 unparsePaths(i->second.refs)));
 
     return makeClosure(roots, elems);
@@ -168,21 +168,21 @@ static ATerm unparseDerivation(const Derivation & derivation)
     ATermList args = ATempty;
     for (Strings::const_iterator i = derivation.args.begin();
          i != derivation.args.end(); i++)
-        args = ATinsert(args, string2ATerm(i->c_str()));
+        args = ATinsert(args, toATerm(*i));
 
     ATermList env = ATempty;
     for (StringPairs::const_iterator i = derivation.env.begin();
          i != derivation.env.end(); i++)
         env = ATinsert(env,
             makeEnvBinding(
-                string2ATerm(i->first.c_str()),
-                string2ATerm(i->second.c_str())));
+                toATerm(i->first),
+                toATerm(i->second)));
 
     return makeDerive(
         unparsePaths(derivation.outputs),
         unparsePaths(derivation.inputs),
-        string2ATerm(derivation.platform.c_str()),
-        string2ATerm(derivation.builder.c_str()),
+        toATerm(derivation.platform),
+        toATerm(derivation.builder),
         ATreverse(args),
         ATreverse(env));
 }