diff --git a/Utilities/StrFmt.h b/Utilities/StrFmt.h index 5f98262268..0c705bd544 100644 --- a/Utilities/StrFmt.h +++ b/Utilities/StrFmt.h @@ -1,5 +1,6 @@ #pragma once #include +#include #include #include #include @@ -94,14 +95,6 @@ namespace fmt{ return str; } - //TODO:remove - //fmt alias for FormatV unused at the moment - template - auto fmt(Args&&... args) -> decltype(FormatV(std::forward(parameters)...)) - { - return FormatV(std::forward(args)...); - } - //convert a wxString to a std::string encoded in utf8 //CAUTION, only use this to interface with wxWidgets classes std::string ToUTF8(const wxString& right); diff --git a/rpcs3/Emu/CPU/CPUDecoder.h b/rpcs3/Emu/CPU/CPUDecoder.h index c686863be8..d05c1d4267 100644 --- a/rpcs3/Emu/CPU/CPUDecoder.h +++ b/rpcs3/Emu/CPU/CPUDecoder.h @@ -1,4 +1,5 @@ #pragma once +#include #include "CPUInstrTable.h" #pragma warning( disable : 4800 ) @@ -321,7 +322,14 @@ public: , m_args_count(args_count) , m_args(args_count ? new CodeFieldBase*[args_count] : nullptr) { - m_name.MakeLower().Replace("_", "."); + std::transform( + name.begin(), + name.end(), + m_name.begin(), + [](const char &a){ + char b = tolower(a); + if (b == '_') b = '.'; + return b; }); } __forceinline const std::string& GetName() const diff --git a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp index 03f7f4a796..e74e741a95 100644 --- a/rpcs3/Emu/Cell/PPUProgramCompiler.cpp +++ b/rpcs3/Emu/Cell/PPUProgramCompiler.cpp @@ -149,7 +149,7 @@ void CompilePPUProgram::WriteError(const std::string& error) { if(m_err_list) { - m_err_list->WriteText(fmt::FromUTF8(fmt::Format("line %lld: %s\n", m_line, error))); + m_err_list->WriteText(fmt::FromUTF8(fmt::Format("line %lld: %s\n", m_line, error.c_str()))); } }