diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-01-04 19:09:40 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-01-04 19:09:40 +0100 |
commit | ca5baf239277daecef489a415fe157094bd7e799 (patch) | |
tree | 2ee3f83fce26b88ce8690adb6751e28149ee8ae4 /src/libexpr/value.hh | |
parent | ed93aec3c317e5dc3748b28e451c8eb6df377060 (diff) |
Turn mkString(Symbol) into a method
Diffstat (limited to 'src/libexpr/value.hh')
-rw-r--r-- | src/libexpr/value.hh | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index ba647a10d..7d007ebdc 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/value.hh @@ -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; |