From 4ba965795272ad6fb0d2510d50b66526f70ad82d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 29 Aug 2014 11:42:13 +0000 Subject: [PATCH] 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 --- src/common/cmdline.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/cmdline.cpp b/src/common/cmdline.cpp index 97e3229637..a9020f17d1 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -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