added SetCmdLine(int, char **) overload even when building a Unicode app
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -189,7 +189,10 @@ struct wxCmdLineParserData
|
||||
|
||||
// methods
|
||||
wxCmdLineParserData();
|
||||
void SetArguments(int argc, char **argv);
|
||||
#if wxUSE_UNICODE
|
||||
void SetArguments(int argc, wxChar **argv);
|
||||
#endif // wxUSE_UNICODE
|
||||
void SetArguments(const wxString& cmdline);
|
||||
|
||||
int FindOption(const wxString& name);
|
||||
@@ -214,6 +217,18 @@ wxCmdLineParserData::wxCmdLineParserData()
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxCmdLineParserData::SetArguments(int argc, char **argv)
|
||||
{
|
||||
m_arguments.clear();
|
||||
|
||||
for ( int n = 0; n < argc; n++ )
|
||||
{
|
||||
m_arguments.push_back(wxString::FromAscii(argv[n]));
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
|
||||
void wxCmdLineParserData::SetArguments(int argc, wxChar **argv)
|
||||
{
|
||||
m_arguments.clear();
|
||||
@@ -224,6 +239,8 @@ void wxCmdLineParserData::SetArguments(int argc, wxChar **argv)
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
void wxCmdLineParserData::SetArguments(const wxString& cmdLine)
|
||||
{
|
||||
m_arguments.clear();
|
||||
@@ -277,11 +294,20 @@ void wxCmdLineParser::Init()
|
||||
m_data = new wxCmdLineParserData;
|
||||
}
|
||||
|
||||
void wxCmdLineParser::SetCmdLine(int argc, char **argv)
|
||||
{
|
||||
m_data->SetArguments(argc, argv);
|
||||
}
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
|
||||
void wxCmdLineParser::SetCmdLine(int argc, wxChar **argv)
|
||||
{
|
||||
m_data->SetArguments(argc, argv);
|
||||
}
|
||||
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
void wxCmdLineParser::SetCmdLine(const wxString& cmdline)
|
||||
{
|
||||
m_data->SetArguments(cmdline);
|
||||
|
Reference in New Issue
Block a user