From a84902e66547fef1c0251ebe39d7df7aead14fdc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 29 Aug 2014 11:56:23 +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/trunk@77502 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 92f263a7e1..540abefe46 100644 --- a/src/common/cmdline.cpp +++ b/src/common/cmdline.cpp @@ -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