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

Turn mkString(Symbol) into a method

This commit is contained in:
Eelco Dolstra 2022-01-04 19:09:40 +01:00
parent ed93aec3c3
commit ca5baf2392
3 changed files with 11 additions and 14 deletions

View file

@ -241,6 +241,11 @@ public:
void mkString(std::string_view s, const PathSet & context);
inline void mkString(const Symbol & s)
{
mkString(((const std::string &) s).c_str());
}
inline void mkPath(const char * s)
{
clearValue();
@ -393,14 +398,6 @@ public:
};
// TODO: Remove these static functions, replace call sites with v.mk* instead
static inline void mkString(Value & v, const Symbol & s)
{
v.mkString(((const string &) s).c_str());
}
#if HAVE_BOEHMGC
typedef std::vector<Value *, traceable_allocator<Value *> > ValueVector;
typedef std::map<Symbol, Value *, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, Value *> > > ValueMap;