From 67b2f0a977a4576b0cb18548eb924d60fee2c89a Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 20 Nov 2001 20:57:07 +0000 Subject: [PATCH] - changed getAttribute to avoid MSVC compiler warning --- simgear/misc/props.cxx | 3 ++- simgear/misc/props.hxx | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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); } /** -- 2.39.5