From: david Date: Wed, 20 Mar 2002 21:44:38 +0000 (+0000) Subject: Patch from Frederic Bouvier: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9d96b171a09d1168fbb77323b62521f9b9765c00;p=simgear.git Patch from Frederic Bouvier: deletion of a const char * is not allowed with MSVC 6. I had to cast to char * to avoid compile errors. --- diff --git a/simgear/misc/props.cxx b/simgear/misc/props.cxx index 77daddb2..f9ddde3d 100644 --- a/simgear/misc/props.cxx +++ b/simgear/misc/props.cxx @@ -418,7 +418,7 @@ SGPropertyNode::set_string (const char * val) if (_tied) { return _value.string_val->setValue(val); } else { - delete _local_val.string_val; + delete (char *)_local_val.string_val; _local_val.string_val = copy_string(val); return true; } @@ -461,7 +461,7 @@ SGPropertyNode::clear_value () case UNSPECIFIED: delete _value.string_val; _value.string_val = 0; - delete _local_val.string_val; + delete (char *)_local_val.string_val; _local_val.string_val = 0; break; } @@ -662,7 +662,7 @@ SGPropertyNode::SGPropertyNode (const char * name, */ SGPropertyNode::~SGPropertyNode () { - delete _name; + delete (char *)_name; for (int i = 0; i < (int)_children.size(); i++) { delete _children[i]; }