mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Use Common::ToLower and Common::ToUpper
This commit is contained in:
@ -10,7 +10,6 @@
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <ctime>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@ -19,6 +18,7 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#endif
|
||||
|
||||
@ -167,8 +167,7 @@ std::string ArtworkForGameId(const std::string& gameid)
|
||||
if (REGISTERED_GAMES.count(region_neutral_gameid) != 0)
|
||||
{
|
||||
// Discord asset keys can only be lowercase.
|
||||
std::transform(region_neutral_gameid.begin(), region_neutral_gameid.end(),
|
||||
region_neutral_gameid.begin(), tolower);
|
||||
Common::ToLower(®ion_neutral_gameid);
|
||||
return "game_" + region_neutral_gameid;
|
||||
}
|
||||
return "";
|
||||
|
@ -610,7 +610,7 @@ std::string GameFile::GetNetPlayName(const Core::TitleDatabase& title_database)
|
||||
int disc_number = GetDiscNumber() + 1;
|
||||
|
||||
std::string lower_name = name;
|
||||
std::transform(lower_name.begin(), lower_name.end(), lower_name.begin(), ::tolower);
|
||||
Common::ToLower(&lower_name);
|
||||
if (disc_number > 1 &&
|
||||
lower_name.find(fmt::format("disc {}", disc_number)) == std::string::npos &&
|
||||
lower_name.find(fmt::format("disc{}", disc_number)) == std::string::npos)
|
||||
@ -786,7 +786,7 @@ std::string GameFile::GetFileFormatName() const
|
||||
case DiscIO::Platform::ELFOrDOL:
|
||||
{
|
||||
std::string extension = GetExtension();
|
||||
std::transform(extension.begin(), extension.end(), extension.begin(), ::toupper);
|
||||
Common::ToUpper(&extension);
|
||||
|
||||
// substr removes the dot
|
||||
return extension.substr(std::min<size_t>(1, extension.size()));
|
||||
|
Reference in New Issue
Block a user