1
0
forked from mirrors/0ad

Automatically convert most path.string().c_str() to path.string8()

Done with:

  ag -l 'LOG.*string\(\).c_str\(\)' source | xargs perl -pi -e'1 while
s/(LOG.*string)\(\)\.c_str\(\)/${1}8()/g'

This was SVN commit r16186.
This commit is contained in:
Ykkrosh
2015-01-22 20:35:17 +00:00
parent b90bc147c9
commit 38a8e2e0d6
38 changed files with 113 additions and 113 deletions
+6 -6
View File
@@ -478,7 +478,7 @@ bool ScriptInterface::LoadGlobalScripts()
{
if (!LoadGlobalScriptFile(*it))
{
LOGERROR("LoadGlobalScripts: Failed to load script %ls", it->string().c_str());
LOGERROR("LoadGlobalScripts: Failed to load script %ls", it->string8());
return false;
}
}
@@ -866,7 +866,7 @@ bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
JSAutoRequest rq(m->m_cx);
if (!VfsFileExists(path))
{
LOGERROR("File '%ls' does not exist", path.string().c_str());
LOGERROR("File '%ls' does not exist", path.string8());
return false;
}
@@ -876,7 +876,7 @@ bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
if (ret != PSRETURN_OK)
{
LOGERROR("Failed to load file '%ls': %hs", path.string().c_str(), GetErrorString(ret));
LOGERROR("Failed to load file '%ls': %hs", path.string8(), GetErrorString(ret));
return false;
}
@@ -954,7 +954,7 @@ void ScriptInterface::ReadJSONFile(const VfsPath& path, JS::MutableHandleValue o
{
if (!VfsFileExists(path))
{
LOGERROR("File '%ls' does not exist", path.string().c_str());
LOGERROR("File '%ls' does not exist", path.string8());
return;
}
@@ -964,14 +964,14 @@ void ScriptInterface::ReadJSONFile(const VfsPath& path, JS::MutableHandleValue o
if (ret != PSRETURN_OK)
{
LOGERROR("Failed to load file '%ls': %hs", path.string().c_str(), GetErrorString(ret));
LOGERROR("Failed to load file '%ls': %hs", path.string8(), GetErrorString(ret));
return;
}
std::string content(file.DecodeUTF8()); // assume it's UTF-8
if (!ParseJSON(content, out))
LOGERROR("Failed to parse '%ls'", path.string().c_str());
LOGERROR("Failed to parse '%ls'", path.string8());
}
struct Stringifier