Fix compilation warning

This commit is contained in:
Wojtek Figat
2023-02-16 22:59:31 +01:00
parent 4b08cd3fd7
commit 7dc83b5472

View File

@@ -184,7 +184,7 @@ bool JsonAssetBase::Save(const StringView& path)
writer.EndObject();
// Save json to file
if (File::WriteAllBytes(path.HasChars() ? path : GetPath(), (byte*)buffer.GetString(), (int32)buffer.GetSize()))
if (File::WriteAllBytes(path.HasChars() ? path : StringView(GetPath()), (byte*)buffer.GetString(), (int32)buffer.GetSize()))
{
LOG(Error, "Cannot save \'{0}\'", ToString());
return true;