1
0

Ensure that absent bone names work

Achieved by refactoring the code to use
`std::optional<std::string>` instead of `core::stringc`.
This commit is contained in:
Lars Mueller
2024-01-31 00:00:40 +01:00
parent 4299ee21d8
commit 6ab23fa848
12 changed files with 69 additions and 91 deletions

View File

@@ -697,7 +697,8 @@ ISceneNode* CSceneManager::getSceneNodeFromName(const char* name, ISceneNode* st
if (start == 0)
start = getRootSceneNode();
if (!strcmp(start->getName(),name))
auto startName = start->getName();
if (startName.has_value() && startName == name)
return start;
ISceneNode* node = 0;