Minor fixes

This commit is contained in:
Wojtek Figat
2024-02-26 20:23:18 +01:00
parent 7f935ab57a
commit 2f87b87b45
2 changed files with 4 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ void SceneObject::BreakPrefabLink()
String SceneObject::GetNamePath(Char separatorChar) const
{
Array<String> names;
Array<StringView> names;
const Actor* a = dynamic_cast<const Actor*>(this);
if (!a)
a = GetParent();
@@ -75,6 +75,8 @@ String SceneObject::GetNamePath(Char separatorChar) const
int32 length = names.Count() - 1;
for (int32 i = 0; i < names.Count(); i++)
length += names[i].Length();
if (length == 0)
return String::Empty;
String result;
result.ReserveSpace(length);
Char* ptr = result.Get();