mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-02-10 17:43:03 +00:00
refactor: use asset_type_t for ZoneDefinition
This commit is contained in:
@@ -259,15 +259,15 @@ XAssetInfoGeneric* GameAssetPoolIW4::GetAsset(const asset_type_t type, const std
|
||||
#undef CASE_GET_ASSET
|
||||
}
|
||||
|
||||
const char* GameAssetPoolIW4::AssetTypeNameByType(const asset_type_t assetType)
|
||||
std::optional<const char*> GameAssetPoolIW4::AssetTypeNameByType(const asset_type_t assetType)
|
||||
{
|
||||
if (assetType >= 0 && assetType < static_cast<int>(std::extent_v<decltype(ASSET_TYPE_NAMES)>))
|
||||
return ASSET_TYPE_NAMES[assetType];
|
||||
|
||||
return ASSET_TYPE_INVALID;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
const char* GameAssetPoolIW4::GetAssetTypeName(const asset_type_t assetType) const
|
||||
std::optional<const char*> GameAssetPoolIW4::GetAssetTypeName(const asset_type_t assetType) const
|
||||
{
|
||||
return AssetTypeNameByType(assetType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user