mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 23:08:05 -05:00
chore: use const reference for assetName in GetAsset methods
This commit is contained in:
@ -20,7 +20,7 @@ XAssetInfoGeneric* AssetLoader::LinkAsset(std::string name,
|
||||
m_asset_type, std::move(name), asset, std::move(dependencies), std::move(scriptStrings), std::move(indirectAssetReferences));
|
||||
}
|
||||
|
||||
XAssetInfoGeneric* AssetLoader::GetAssetInfo(std::string name) const
|
||||
XAssetInfoGeneric* AssetLoader::GetAssetInfo(const std::string& name) const
|
||||
{
|
||||
return m_zone->m_pools->GetAsset(m_asset_type, std::move(name));
|
||||
return m_zone->m_pools->GetAsset(m_asset_type, name);
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ protected:
|
||||
std::vector<scr_string_t> scriptStrings,
|
||||
std::vector<IndirectAssetReference> indirectAssetReferences) const;
|
||||
|
||||
_NODISCARD XAssetInfoGeneric* GetAssetInfo(std::string name) const;
|
||||
_NODISCARD XAssetInfoGeneric* GetAssetInfo(const std::string& name) const;
|
||||
};
|
||||
|
@ -55,9 +55,9 @@ void AssetMarker::MarkArray_IndirectAssetRef(const asset_type_t type, const char
|
||||
Mark_IndirectAssetRef(type, assetRefNames[index]);
|
||||
}
|
||||
|
||||
XAssetInfoGeneric* AssetMarker::GetAssetInfoByName(std::string name) const
|
||||
XAssetInfoGeneric* AssetMarker::GetAssetInfoByName(const std::string& name) const
|
||||
{
|
||||
return m_zone->m_pools->GetAsset(m_asset_type, std::move(name));
|
||||
return m_zone->m_pools->GetAsset(m_asset_type, name);
|
||||
}
|
||||
|
||||
std::vector<XAssetInfoGeneric*> AssetMarker::GetDependencies() const
|
||||
|
@ -26,7 +26,7 @@ protected:
|
||||
void Mark_IndirectAssetRef(asset_type_t type, const char* assetRefName);
|
||||
void MarkArray_IndirectAssetRef(asset_type_t type, const char** assetRefNames, size_t count);
|
||||
|
||||
_NODISCARD XAssetInfoGeneric* GetAssetInfoByName(std::string name) const;
|
||||
_NODISCARD XAssetInfoGeneric* GetAssetInfoByName(const std::string& name) const;
|
||||
|
||||
Zone* m_zone;
|
||||
|
||||
|
Reference in New Issue
Block a user