Fix regression from 6d05bf16b1
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user