Allow wxCmdLineParser::Parse() to be called more than once.

Clear the previously collected parameters in the beginning to avoid
accumulating the results from several command lines.

Closes #16503.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-29 11:56:23 +00:00
parent 335cae46a9
commit a84902e665

View File

@@ -825,6 +825,7 @@ int wxCmdLineParser::Parse(bool showUsage)
Reset();
// parse everything
m_data->m_parameters.clear();
wxString arg;
size_t count = m_data->m_arguments.size();
for ( size_t n = 1; ok && (n < count); n++ ) // 0 is program name