From: david Date: Fri, 22 Mar 2002 12:45:11 +0000 (+0000) Subject: More rearrangement of headers. Replaced delete with delete[] where X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c896475765406c2c2d9faae306ef2e65dc4f4d6e;p=simgear.git More rearrangement of headers. Replaced delete with delete[] where appropriate. --- diff --git a/simgear/misc/props.cxx b/simgear/misc/props.cxx index 8fbbbd58..fc0e549a 100644 --- a/simgear/misc/props.cxx +++ b/simgear/misc/props.cxx @@ -8,6 +8,10 @@ #include "props.hxx" +#include +#include +#include + #if PROPS_STANDALONE #include @@ -17,7 +21,6 @@ using std::sort; #else -#include #include #include @@ -25,9 +28,6 @@ SG_USING_STD(sort); #endif -#include -#include - //////////////////////////////////////////////////////////////////////// @@ -418,7 +418,7 @@ SGPropertyNode::set_string (const char * val) if (_tied) { return _value.string_val->setValue(val); } else { - delete (char *)_local_val.string_val; + delete [] (char *)_local_val.string_val; _local_val.string_val = copy_string(val); return true; } @@ -474,7 +474,7 @@ SGPropertyNode::clear_value () delete _value.string_val; _value.string_val = 0; } else { - delete (char *)_local_val.string_val; + delete [] (char *)_local_val.string_val; } _local_val.string_val = 0; break; @@ -676,7 +676,7 @@ SGPropertyNode::SGPropertyNode (const char * name, */ SGPropertyNode::~SGPropertyNode () { - delete (char *)_name; + delete [] (char *)_name; for (int i = 0; i < (int)_children.size(); i++) { delete _children[i]; }