]> git.saurik.com Git - wxWidgets.git/commit
Output the extracted number from wxString::ToXXX() even if it returns false.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Aug 2009 17:25:19 +0000 (17:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Aug 2009 17:25:19 +0000 (17:25 +0000)
commit69d31e313035d5e22d9400ec946f6007f710910c
tree134a9eed68cc7cfe408b77a046039356da0b35e3
parent4329eae9433dd4e7eaf8181ecc125b1f25571904
Output the extracted number from wxString::ToXXX() even if it returns false.

After the changes in r50710 wxString numeric conversion functions didn't
update their output parameter any more if the conversion failed because not
entire string was converted. This was incompatible with the old behaviour
which some existing code did rely on, so restore it and now always return the
number which was extracted from the beginning of the string if we found
anything at all, even if the function returns false.

Add unit test for the correct behaviour and updated the documentation.

Closes #11126.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
interface/wx/string.h
src/common/string.cpp
tests/strings/strings.cpp