Fix regression from 6d05bf16b1

This commit is contained in:
Wojtek Figat
2025-09-05 08:40:13 +02:00
parent 67220d3f80
commit 1f6d837117
4 changed files with 4 additions and 4 deletions

View File

@@ -279,7 +279,7 @@ void Asset::OnDeleteObject()
const bool wasMarkedToDelete = _deleteFileOnUnload != 0;
#if USE_EDITOR
const String path = wasMarkedToDelete ? GetPath() : StringView::Empty;
const String path = wasMarkedToDelete ? String(GetPath()) : String::Empty;
#endif
const Guid id = GetID();

View File

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

View File

@@ -444,7 +444,7 @@ bool MeshBase::Init(uint32 vertices, uint32 triangles, const Array<const void*,
// Create GPU buffers
#if GPU_ENABLE_RESOURCE_NAMING
const String& modelPath = _model->GetPath();
const String modelPath = _model->GetPath();
#define MESH_BUFFER_NAME(postfix) modelPath + TEXT(postfix)
#else
#define MESH_BUFFER_NAME(postfix) String::Empty

View File

@@ -217,7 +217,7 @@ bool ShaderAssetBase::LoadShaderCache(ShaderCacheResult& result)
&& parent->HasChunk(SHADER_FILE_CHUNK_SOURCE))
{
result.Data.Release();
const String parentPath = parent->GetPath();
const StringView parentPath = parent->GetPath();
const Guid parentID = parent->GetID();
LOG(Info, "Compiling shader '{0}':{1}...", parentPath, parentID);