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/branches/WX_3_0_BRANCH@77499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-29 11:42:13 +00:00
parent 05a1abfb1f
commit 4ba9657952

View File

@@ -672,6 +672,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