From Sukender, "I added private constructors to osg::ValueObject & TemplatedValueObject, to avoid allocation on the stack and ugly things like:

TemplatedValueObject<int> value(....);
 container->addUserObject(value);"
This commit is contained in:
Robert Osfield 2011-09-12 10:43:24 +00:00
parent 83524f958e
commit 94777c4ef5

View File

@ -93,6 +93,8 @@ class ValueObject : public Object
virtual bool get(GetValueVisitor& gvv) const { return false; }
virtual bool set(SetValueVisitor& gvv) { return false; }
protected:
virtual ~ValueObject() {}
};
template< typename T >
@ -133,6 +135,7 @@ class TemplateValueObject : public ValueObject
protected:
virtual ~TemplateValueObject() {}
static const char* s_TemplateValueObject_className;
T _value;