summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Assets/TextureAsset.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-10-17 02:34:18 +0200
committerGitHub <noreply@github.com>2023-10-17 02:34:18 +0200
commit7122c7e87212ec007ca30c38809aa5ded3c6331f (patch)
tree0ae0fe19fcca4a841f52c05d55cabd08091e4015 /Source/Core/VideoCommon/Assets/TextureAsset.cpp
parent2ae9771a30bf5489e68632bc57b41d3c99e6d2c6 (diff)
parentb292022bc7ac424ed00dd606b5f18ee32b9b576a (diff)
Merge pull request #12243 from iwubcode/tolower_assets
VideoCommon: use ToLower function in assets when parsing json
Diffstat (limited to 'Source/Core/VideoCommon/Assets/TextureAsset.cpp')
-rw-r--r--Source/Core/VideoCommon/Assets/TextureAsset.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/Assets/TextureAsset.cpp b/Source/Core/VideoCommon/Assets/TextureAsset.cpp
index 9418add8d1..484e89c19d 100644
--- a/Source/Core/VideoCommon/Assets/TextureAsset.cpp
+++ b/Source/Core/VideoCommon/Assets/TextureAsset.cpp
@@ -4,6 +4,7 @@
#include "VideoCommon/Assets/TextureAsset.h"
#include "Common/Logging/Log.h"
+#include "Common/StringUtil.h"
#include "VideoCommon/BPMemory.h"
namespace VideoCommon
@@ -31,8 +32,7 @@ bool ParseSampler(const VideoCommon::CustomAssetLibrary::AssetID& asset_id,
return false;
}
std::string sampler_state_mode = sampler_state_mode_iter->second.to_str();
- std::transform(sampler_state_mode.begin(), sampler_state_mode.end(), sampler_state_mode.begin(),
- [](unsigned char c) { return std::tolower(c); });
+ Common::ToLower(&sampler_state_mode);
if (sampler_state_mode == "clamp")
{
@@ -71,8 +71,7 @@ bool ParseSampler(const VideoCommon::CustomAssetLibrary::AssetID& asset_id,
return false;
}
std::string sampler_state_filter = sampler_state_filter_iter->second.to_str();
- std::transform(sampler_state_filter.begin(), sampler_state_filter.end(),
- sampler_state_filter.begin(), [](unsigned char c) { return std::tolower(c); });
+ Common::ToLower(&sampler_state_filter);
if (sampler_state_filter == "linear")
{
sampler->tm0.min_filter = FilterMode::Linear;
@@ -116,8 +115,7 @@ bool TextureData::FromJson(const CustomAssetLibrary::AssetID& asset_id,
return false;
}
std::string type = type_iter->second.to_str();
- std::transform(type.begin(), type.end(), type.begin(),
- [](unsigned char c) { return std::tolower(c); });
+ Common::ToLower(&type);
if (type == "texture2d")
{