1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-07 03:45:33 +00:00

Use std::string_view

This commit is contained in:
Sam Hellawell 2024-04-02 15:18:35 +01:00
parent dab982cba6
commit ae68f4600b
2 changed files with 2 additions and 2 deletions

View file

@ -663,7 +663,7 @@ namespace Resource
node->accept(rigFinder); node->accept(rigFinder);
for (osg::Node* foundRigNode : rigFinder.mFoundNodes) for (osg::Node* foundRigNode : rigFinder.mFoundNodes)
{ {
if (foundRigNode->libraryName() == std::string("osgAnimation")) if (foundRigNode->libraryName() == std::string_view("osgAnimation"))
{ {
osgAnimation::RigGeometry* foundRigGeometry = static_cast<osgAnimation::RigGeometry*>(foundRigNode); osgAnimation::RigGeometry* foundRigGeometry = static_cast<osgAnimation::RigGeometry*>(foundRigNode);

View file

@ -47,7 +47,7 @@ namespace SceneUtil
{ {
// If an osgAnimation bone/transform, ensure underscores in name are replaced with spaces // If an osgAnimation bone/transform, ensure underscores in name are replaced with spaces
// this is for compatibility reasons // this is for compatibility reasons
if (node.libraryName() == std::string("osgAnimation") && node.className() == std::string("Bone")) if (node.libraryName() == std::string_view("osgAnimation") && node.className() == std::string_view("Bone"))
node.setName(Misc::StringUtils::underscoresToSpaces(node.getName())); node.setName(Misc::StringUtils::underscoresToSpaces(node.getName()));
if (!mSceneMgr->getSoftParticles()) if (!mSceneMgr->getSoftParticles())