1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-31 16:18:28 +00:00

make android adk happy

This commit is contained in:
Bo Svensson 2021-09-06 11:48:49 +00:00 committed by GitHub
parent ef3bacf11b
commit 761cee128d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,14 +86,14 @@ namespace SceneUtil
std::string mFilter2;
};
void mergeUserData(osg::UserDataContainer* source, osg::Object* target)
void mergeUserData(const osg::UserDataContainer* source, osg::Object* target)
{
if (!target->getUserDataContainer())
target->setUserDataContainer(source);
target->setUserDataContainer(osg::clone(source, osg::CopyOp::SHALLOW_COPY));
else
{
for (unsigned int i=0; i<source->getNumUserObjects(); ++i)
target->getUserDataContainer()->addUserObject(source->getUserObject(i));
target->getUserDataContainer()->addUserObject(osg::clone(source->getUserObject(i), osg::CopyOp::SHALLOW_COPY));
}
}
@ -176,7 +176,7 @@ namespace SceneUtil
else
{
attachNode->addChild(clonedToAttach);
return toAttach;
return clonedToAttach;
}
}
}