SCM: Use std::string.

Those macros may be defined, or not. We should support both cases, so use std::string as it also defines the length of the string.
This commit is contained in:
degasus
2016-05-04 23:47:23 +02:00
parent dbd67c6b06
commit 2030ad4577
11 changed files with 31 additions and 32 deletions

View File

@ -31,8 +31,8 @@ AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id,
const wxString DolphinText = _("Dolphin");
const wxString RevisionText = scm_desc_str;
const wxString CopyrightText = _("(c) 2003-2015+ Dolphin Team. \"GameCube\" and \"Wii\" are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.");
const wxString BranchText = wxString::Format(_("Branch: %s"), scm_branch_str);
const wxString BranchRevText = wxString::Format(_("Revision: %s"), scm_rev_git_str);
const wxString BranchText = wxString::Format(_("Branch: %s"), scm_branch_str.c_str());
const wxString BranchRevText = wxString::Format(_("Revision: %s"), scm_rev_git_str.c_str());
const wxString CheckUpdateText = _("Check for updates: ");
const wxString Text = _("\n"
"Dolphin is a free and open-source GameCube and Wii emulator.\n"

View File

@ -705,7 +705,7 @@ void CFrame::UpdateTitle(const std::string &str)
}
else
{
std::string titleStr = StringFromFormat("%s | %s", scm_rev_str, str.c_str());
std::string titleStr = StringFromFormat("%s | %s", scm_rev_str.c_str(), str.c_str());
m_RenderFrame->SetTitle(titleStr);
}
}

View File

@ -320,14 +320,14 @@ int main(int argc, char* argv[])
help = 1;
break;
case 'v':
fprintf(stderr, "%s\n", scm_rev_str);
fprintf(stderr, "%s\n", scm_rev_str.c_str());
return 1;
}
}
if (help == 1 || argc == optind)
{
fprintf(stderr, "%s\n\n", scm_rev_str);
fprintf(stderr, "%s\n\n", scm_rev_str.c_str());
fprintf(stderr, "A multi-platform GameCube/Wii emulator\n\n");
fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]);
fprintf(stderr, " -e, --exec Load the specified file\n");