From fde5a86bdac3b4286b48620ec5c1ee9be01b4549 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Feb 2002 13:27:38 +0000 Subject: [PATCH] reverted the previous fix, it's no longer needed now after the change to the default base in wxString::ToULong git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datetime.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index 73973840e1..418a72f51c 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -440,11 +440,7 @@ static bool GetNumericToken(size_t len, const wxChar*& p, unsigned long *number) break; } - // use the base 10 explicitly because otherwise the string "09" (the - // leading zeroes are common in the date specifications) is not parsed - // correctly as, according to the standard C rules, it is understood as an - // octal number and '9' is not a valid octal digit! - return !s.empty() && s.ToULong(number, 10); + return !!s && s.ToULong(number); } // scans all alphabetic characters and returns the resulting string @@ -3106,7 +3102,7 @@ const wxChar *wxDateTime::ParseDate(const wxChar *date) // is it a number? unsigned long val; - if ( token.ToULong(&val, 10) ) // 10: see comment in GetNumericToken() + if ( token.ToULong(&val) ) { // guess what this number is