]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datetimefmt.cpp
Added 'HasAlpha' attribute for wxColourProperty. Setting it to true allows user to...
[wxWidgets.git] / src / common / datetimefmt.cpp
index 7095fde8566ecbca67635ab2706f27d18ee5636f..a073b3fcfc92bd884fa20e1f588cfe19af6fd9e1 100644 (file)
@@ -648,9 +648,10 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const
 
                 default:
                     // is it the format width?
-                    fmt.Empty();
-                    while ( *p == wxT('-') || *p == wxT('+') ||
-                            *p == wxT(' ') || wxIsdigit(*p) )
+                    for ( fmt.clear();
+                          *p == wxT('-') || *p == wxT('+') ||
+                            *p == wxT(' ') || wxIsdigit(*p);
+                          ++p )
                     {
                         fmt += *p;
                     }
@@ -1624,9 +1625,10 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end)
     while ( p != pEnd )
     {
         // skip white space and date delimiters
-        while ( wxStrchr(".,/-\t\r\n ", *p) )
+        if ( wxStrchr(".,/-\t\r\n ", *p) )
         {
             ++p;
+            continue;
         }
 
         // modify copy of the iterator as we're not sure if the next token is