From: curt Date: Tue, 20 Nov 2001 20:57:07 +0000 (+0000) Subject: - changed getAttribute to avoid MSVC compiler warning X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=67b2f0a977a4576b0cb18548eb924d60fee2c89a;p=simgear.git - changed getAttribute to avoid MSVC compiler warning --- diff --git a/simgear/misc/props.cxx b/simgear/misc/props.cxx index 66e2c116..7e911668 100644 --- a/simgear/misc/props.cxx +++ b/simgear/misc/props.cxx @@ -358,8 +358,9 @@ SGPropertyNode::SGPropertyNode (const string &name, */ SGPropertyNode::~SGPropertyNode () { - for (int i = 0; i < (int)_children.size(); i++) + for (int i = 0; i < (int)_children.size(); i++) { delete _children[i]; + } clear_value(); } diff --git a/simgear/misc/props.hxx b/simgear/misc/props.hxx index bcaf6664..df15d9d6 100644 --- a/simgear/misc/props.hxx +++ b/simgear/misc/props.hxx @@ -27,6 +27,11 @@ SG_USING_STD(istream); SG_USING_STD(ostream); #endif +#ifdef NONE +#pragma warn A sloppy coder has defined NONE as a macro! +#undef NONE +#endif + #ifdef ALIAS #pragma warn A sloppy coder has defined ALIAS as a macro! #undef ALIAS @@ -694,7 +699,7 @@ public: /** * Check a single mode attribute for the property node. */ - bool getAttribute (Attribute attr) const { return (bool)(_attr & attr); } + bool getAttribute (Attribute attr) const { return ((_attr & attr) != 0); } /**