chore: use const reference for assetName in GetAsset methods

This commit is contained in:
Jan
2024-03-30 17:19:32 +01:00
parent d26fda2e92
commit e7a9e4b528
15 changed files with 19 additions and 19 deletions

View File

@ -169,7 +169,7 @@ XAssetInfoGeneric* GameAssetPoolIW3::AddAssetToPool(std::unique_ptr<XAssetInfoGe
#undef CASE_ADD_TO_POOL
}
XAssetInfoGeneric* GameAssetPoolIW3::GetAsset(const asset_type_t type, std::string name) const
XAssetInfoGeneric* GameAssetPoolIW3::GetAsset(const asset_type_t type, const std::string& name) const
{
#define CASE_GET_ASSET(assetType, poolName) \
case assetType: \

View File

@ -52,7 +52,7 @@ public:
void InitPoolStatic(asset_type_t type, size_t capacity) override;
void InitPoolDynamic(asset_type_t type) override;
_NODISCARD XAssetInfoGeneric* GetAsset(asset_type_t type, std::string name) const override;
_NODISCARD XAssetInfoGeneric* GetAsset(asset_type_t type, const std::string& name) const override;
static const char* AssetTypeNameByType(asset_type_t assetType);
_NODISCARD const char* GetAssetTypeName(asset_type_t assetType) const override;