diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-12-12 02:22:58 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-12-12 03:31:52 +0100 |
commit | 730b152b190135adef2f53c7a80cfd1111d37ead (patch) | |
tree | 1ad977d618642e65345dc94efd919fe4b0d14f71 /src/libexpr/value.hh | |
parent | bf9890396731a2bbe4f04a49684dee463d818906 (diff) |
Make Value::type private
This is an implementation detail and shouldn't be used. Use normalType()
and the various is<Type> functions instead
Diffstat (limited to 'src/libexpr/value.hh')
-rw-r--r-- | src/libexpr/value.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index e743da9c3..4050d7e4b 100644 --- a/src/libexpr/value.hh +++ b/src/libexpr/value.hh @@ -106,8 +106,14 @@ std::ostream & operator << (std::ostream & str, const ExternalValueBase & v); struct Value { +private: ValueType type; +friend std::string showType(const Value & v); +friend void printValue(std::ostream & str, std::set<const Value *> & active, const Value & v); + +public: + inline void setInt() { type = tInt; }; inline void setBool() { type = tBool; }; inline void setString() { type = tString; }; |