remove dummy alias in strfmt. Fix some wxString remnants, that only make problems in Linux

This commit is contained in:
Peter Tissen 2014-04-01 20:13:22 +02:00
parent 69352206b6
commit 373ae6b107
3 changed files with 11 additions and 10 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <string>
#include <vector>
#include <ostream>
#include <sstream>
#include <cstdio>
@ -94,14 +95,6 @@ namespace fmt{
return str;
}
//TODO:remove
//fmt alias for FormatV unused at the moment
template <typename... Args>
auto fmt(Args&&... args) -> decltype(FormatV(std::forward<Args>(parameters)...))
{
return FormatV(std::forward<Args>(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);

View file

@ -1,4 +1,5 @@
#pragma once
#include <algorithm>
#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

View file

@ -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())));
}
}