Use compact syntax for converting C strings to C++ strings.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@374 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Maarten ter Huurne 2008-08-28 19:22:36 +00:00
parent cfd31f4385
commit 1716ef46bb
3 changed files with 6 additions and 9 deletions

View File

@ -87,9 +87,9 @@ CGameListCtrl::BrowseForDirectory()
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
std::string temp; SConfig::GetInstance().m_ISOFolder.push_back(
temp.insert(0, dialog.GetPath().ToAscii()); //Manual conversion to C++ string std::string(dialog.GetPath().ToAscii())
SConfig::GetInstance().m_ISOFolder.push_back(temp); );
SConfig::GetInstance().SaveSettings(); SConfig::GetInstance().SaveSettings();
Update(); Update();
} }

View File

@ -67,11 +67,10 @@ int main(int argc, char* argv[])
puts("Please supply at least one argument - the ISO to boot.\n"); puts("Please supply at least one argument - the ISO to boot.\n");
return(1); return(1);
} }
std::string temp; std::string bootFile(argv[1]);
temp.insert(0, argv[1]); //Need to convert to C++ style string first
DetectCPU(); DetectCPU();
BootManager::BootCore(temp); BootManager::BootCore(bootFile);
usleep(2000 * 1000 * 1000); usleep(2000 * 1000 * 1000);
// while (!getch()) { // while (!getch()) {
// usleep(20); // usleep(20);

View File

@ -41,9 +41,7 @@ CPluginManager::ScanForPlugins(wxWindow* _wxWindow)
m_PluginInfos.clear(); m_PluginInfos.clear();
CFileSearch::XStringVector Directories; CFileSearch::XStringVector Directories;
std::string temp; Directories.push_back(std::string("Plugins"));
temp.insert(0, "Plugins");
Directories.push_back(temp);
CFileSearch::XStringVector Extensions; CFileSearch::XStringVector Extensions;
#ifdef _WIN32 #ifdef _WIN32