Fixed get type from extension bug in asset handler
This commit is contained in:
parent
e824c17405
commit
6df3f3d417
|
@ -102,6 +102,8 @@ constexpr std::string_view EXTENSIONS[] = {
|
|||
AUDIO_WAV_EXTENSION,
|
||||
};
|
||||
|
||||
constexpr size_t EXTENSIONS_COUNT{ 11 };
|
||||
|
||||
// EXTERNAL EXTENSIONS
|
||||
constexpr std::string_view GLSL_EXTENSION{ ".glsl" };
|
||||
constexpr std::string_view DDS_EXTENSION{ ".dds" };
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace SHADE
|
|||
****************************************************************************/
|
||||
AssetType SHAssetMetaHandler::GetTypeFromExtension(AssetExtension ext) noexcept
|
||||
{
|
||||
for (int i{0}; i < EXTENSIONS->size(); ++i)
|
||||
for (auto i{0}; i < EXTENSIONS_COUNT; ++i)
|
||||
{
|
||||
if (strcmp(ext.c_str(), EXTENSIONS[i].data()) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue