class PropertyObject : PropertyObjectBase
{
public:
- PropertyObject();
+ PropertyObject()
+ {}
/**
* Create from path relative to the default root, and option default value
*/
- PropertyObject(const char* aChild) :
+ explicit PropertyObject(const char* aChild) :
PropertyObjectBase(aChild)
{ }
/**
* Create from a node, with optional relative path
*/
- PropertyObject(SGPropertyNode* aNode, const char* aChild = NULL) :
+ explicit PropertyObject(SGPropertyNode* aNode, const char* aChild = NULL) :
PropertyObjectBase(aNode, aChild)
{
T operator=(const T& aValue)
{
SGPropertyNode* n = PropertyObjectBase::node(true);
- if (!n) {
+ if( !n )
return aValue;
- }
-
+
n->setValue<T>(aValue);
return aValue;
}
T operator op##=(const T rhs)\
{\
SGPropertyNode* n = getOrThrow();\
- n->setValue<T>(n->getValue<T>() op rhs);\
- return *this;\
+ T new_val = n->getValue<T>() op rhs;\
+ n->setValue<T>(new_val);\
+ return new_val;\
}
SG_DEF_ASSIGN_OP(+)
class PropertyObject<std::string> : PropertyObjectBase
{
public:
- PropertyObject(const char* aChild) :
+ explicit PropertyObject(const char* aChild) :
PropertyObjectBase(aChild)
{ }
- PropertyObject(SGPropertyNode* aNode, const char* aChild = NULL) :
+ explicit PropertyObject(SGPropertyNode* aNode, const char* aChild = NULL) :
PropertyObjectBase(aNode, aChild)
{