1
0
Fork 0

Make value operator== const, add some limit checks in PrintConfigfile and related functions. Unify style a bit more.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4332
This commit is contained in:
Peter Veenstra 2020-02-24 20:00:55 +00:00
parent 6a1a1eff9c
commit 5d654fc5c5
3 changed files with 94 additions and 90 deletions

View file

@ -44,7 +44,7 @@ public:
const char * GetFileName(){ return file_name.c_str();}
bool FindExist(char const * const name,bool remove=false);
bool FindHex(char const * const name,int & value,bool remove=false);
bool FindHex(char const * const name,unsigned int & value,bool remove=false);
bool FindInt(char const * const name,int & value,bool remove=false);
bool FindString(char const * const name,std::string & value,bool remove=false);
bool FindCommand(unsigned int which,std::string & value);

View file

@ -96,7 +96,7 @@ public:
Value& operator= (char const * const in) { return copy(Value(in));}
Value& operator= (Value const& in) { return copy(Value(in));}
bool operator== (Value const & other);
bool operator== (Value const & other) const;
operator bool () const;
operator Hex () const;
operator int () const;
@ -150,7 +150,7 @@ protected:
}
Value value;
std::vector<Value> suggested_values;
typedef std::vector<Value>::iterator iter;
typedef std::vector<Value>::const_iterator const_iter;
Value default_value;
const Changeable::Value change;
};