]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/cmdline.cpp
export wxStatusBarPaneArray from the DLL to fix Borland multilib build
[wxWidgets.git] / src / common / cmdline.cpp
index 95afbfe27f0b262814fffb0e21e40fb1bacb4f75..c0a7e4131c1fe19717173c52fe38302eb878f167 100644 (file)
@@ -74,7 +74,6 @@ struct wxCmdLineOption
                     int fl)
     {
         // wxCMD_LINE_USAGE_TEXT uses only description, shortName and longName is empty
-    #ifdef __WXDEBUG__
         if ( k != wxCMD_LINE_USAGE_TEXT )
         {
             wxASSERT_MSG
@@ -95,8 +94,6 @@ struct wxCmdLineOption
                 wxT("Long option contains invalid characters")
             );
         }
-    #endif // __WXDEBUG__
-
 
         kind = k;
 
@@ -450,7 +447,7 @@ void wxCmdLineParser::AddParam(const wxString& desc,
 {
     // do some consistency checks: a required parameter can't follow an
     // optional one and nothing should follow a parameter with MULTIPLE flag
-#ifdef __WXDEBUG__
+#if wxDEBUG_LEVEL
     if ( !m_data->m_paramDesc.IsEmpty() )
     {
         wxCmdLineParam& param = m_data->m_paramDesc.Last();
@@ -464,7 +461,7 @@ void wxCmdLineParser::AddParam(const wxString& desc,
                           _T("a required parameter can't follow an optional one") );
         }
     }
-#endif // Debug
+#endif // wxDEBUG_LEVEL
 
     wxCmdLineParam *param = new wxCmdLineParam(desc, type, flags);
 
@@ -872,8 +869,8 @@ int wxCmdLineParser::Parse(bool showUsage)
                         case wxCMD_LINE_VAL_DATE:
                             {
                                 wxDateTime dt;
-                                const char *res = dt.ParseDate(value);
-                                if ( !res || *res )
+                                wxString::const_iterator end;
+                                if ( !dt.ParseDate(value) || end != value.end() )
                                 {
                                     errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."),
                                                                  name.c_str(), value.c_str())
@@ -1332,7 +1329,7 @@ wxCmdLineParser::ConvertStringToArgs(const wxString& cmdline,
                     break;
                 }
 
-                lastBS = ch == '\\';
+                lastBS = !lastBS && ch == '\\';
             }
             else // type == wxCMD_LINE_SPLIT_UNIX
             {