#include <algorithm>
#include "props.hxx"
-FG_USING_STD(sort);
+SG_USING_STD(sort);
\f
}
// Success! This is the one we want.
- else if (position >= components.size()) {
+ else if (position >= (int)components.size()) {
return current;
}
case UNKNOWN:
return (GET_STRING == "true" || getDoubleValue() != 0.0L);
}
+
+ return false;
}
case UNKNOWN:
return atoi(GET_STRING.c_str());
}
+
+ return 0;
}
case UNKNOWN:
return atof(GET_STRING.c_str());
}
+
+ return 0.0;
}
case UNKNOWN:
return strtod(GET_STRING.c_str(), 0);
}
+
+ return 0.0;
}
sprintf(buf, "%f", GET_FLOAT);
return buf;
case DOUBLE:
- sprintf(buf, "%lf", GET_DOUBLE);
+ sprintf(buf, "%f", GET_DOUBLE);
return buf;
case STRING:
case UNKNOWN:
return GET_STRING;
}
+
+ return "";
}
else if (_tied)
return false;
- bool old_val;
+ bool old_val = false;
if (use_default)
old_val = getBoolValue();
else if (_tied)
return false;
- int old_val;
+ int old_val = 0;
if (use_default)
old_val = getIntValue();
else if (_tied)
return false;
- float old_val;
+ float old_val = 0.0;
if (use_default)
old_val = getFloatValue();
else if (_tied)
return false;
- double old_val;
+ double old_val = 0.0;
if (use_default)
old_val = getDoubleValue();
SGPropertyNode::~SGPropertyNode ()
{
delete _value;
- for (int i = 0; i < _children.size(); i++)
+ for (int i = 0; i < (int)_children.size(); i++)
delete _children[i];
}