Initialise all fields when constructing, fixes unintentional value reuse with Prop_multival.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3890
This commit is contained in:
parent
85667fbe0f
commit
b81c813b87
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ public:
|
|||
Value(char const * const in) :_string(new std::string(in)),type(V_STRING) { };
|
||||
Value(Value const& in):_string(0) {plaincopy(in);}
|
||||
~Value() { destroy();};
|
||||
Value(std::string const& in,Etype _t) :_string(0),type(V_NONE) {SetValue(in,_t);}
|
||||
Value(std::string const& in,Etype _t) :_hex(0),_bool(false),_int(0),_string(0),_double(0),type(V_NONE) {SetValue(in,_t);}
|
||||
|
||||
/* Assigment operators */
|
||||
Value& operator= (Hex in) throw(WrongType) { return copy(Value(in));}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue