Make Value::type private

This is an implementation detail and shouldn't be used. Use normalType()
and the various is<Type> functions instead
This commit is contained in:
Silvan Mosberger 2020-12-12 02:22:58 +01:00
parent bf98903967
commit 730b152b19
No known key found for this signature in database
GPG Key ID: E8F1E9EAD284E17D
2 changed files with 7 additions and 1 deletions

View File

@ -68,7 +68,7 @@ RootValue allocRootValue(Value * v)
}
static void printValue(std::ostream & str, std::set<const Value *> & active, const Value & v)
void printValue(std::ostream & str, std::set<const Value *> & active, const Value & v)
{
checkInterrupt();

View File

@ -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; };