- changed getAttribute to avoid MSVC compiler warning

This commit is contained in:
curt
2001-11-20 20:57:07 +00:00
parent 70c6b48a07
commit 67b2f0a977
2 changed files with 8 additions and 2 deletions

View File

@@ -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();
}

View File

@@ -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); }
/**