[osg-users] META_object macro returning osg::Object* for cloneType and clone

Hartwig Wiesmann hartwig.wiesmann at skywind.eu
Sun Nov 26 10:10:26 PST 2017


if you have a list of pointer of derived classes from osg::Object and you would like to clone them you always have to cast them. And I like to prevent casts as often as possible.

Example: if you clone a StateAttribute you get back a pointer to an Object although you know (and the compiler could also know) that the result is a StateAttribute.


Read this topic online here:

More information about the osg-users mailing list