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)
{
std::string temp;
temp.insert(0, dialog.GetPath().ToAscii()); //Manual conversion to C++ string
SConfig::GetInstance().m_ISOFolder.push_back(temp);
SConfig::GetInstance().m_ISOFolder.push_back(
std::string(dialog.GetPath().ToAscii())
);
SConfig::GetInstance().SaveSettings();
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");
return(1);
}
std::string temp;
temp.insert(0, argv[1]); //Need to convert to C++ style string first
std::string bootFile(argv[1]);
DetectCPU();
BootManager::BootCore(temp);
BootManager::BootCore(bootFile);
usleep(2000 * 1000 * 1000);
// while (!getch()) {
// usleep(20);

View File

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