Commit Graph

372 Commits

Author SHA1 Message Date
Francesco Montorsi
529e491ce0 add the ToCLong, ToCULong and ToCDouble functions, with docs and test units
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-20 14:50:06 +00:00
Václav Slavík
862bb5c73a renamed ATTRIBUTE_PRINTF to WX_ATTRIBUTE_PRINTF to avoid naming conflicts (e.g. with latest libxml2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-11 07:51:38 +00:00
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Francesco Montorsi
cbec0f401a add wxStringCheck templated utility function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-31 21:19:37 +00:00
Stefan Csomor
b69470e4ee workaround for crashes in release builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-30 20:58:08 +00:00
Vadim Zeitlin
5c33522fca replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 02:39:52 +00:00
Vadim Zeitlin
6b583d40a8 fix linking problems due to MSVC implicitly considering template classes specializations used as base classes DLL-exported even though it doesn't actually export them when building the DLL (with or without explicit declspec(dllexport)); also replace wxCharTypeBuffer::NullData with a static function to allow not DLL-exporting this class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-30 23:04:29 +00:00
Vadim Zeitlin
7929902d65 no real changes, just fixed all occurences of 'occurence' typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-29 12:10:58 +00:00
Vadim Zeitlin
18666b42ca no changes, just clarified meaning of various conversion functions in a comment
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-22 12:43:35 +00:00
Stefan Csomor
6e42b980d9 fixing compilo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-11 07:40:58 +00:00
Stefan Csomor
e317bd3f10 solving osx problems (default inlines-hidden) by explicitely exporting the involved methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-11 06:46:23 +00:00
Stefan Csomor
c1158f7b91 avoiding crashes on osx during app shutdown
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-07 20:36:41 +00:00
Vadim Zeitlin
24f86c43c4 implement Empty() using clear() instead of Truncate(0)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-06 22:19:42 +00:00
Vadim Zeitlin
e810df36b3 access TLS cache variable directly and not via a helper function when using compiler with native TLS support to work around an apparent bug in g++
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-06 22:12:04 +00:00
Paul Cornett
1224b8a386 silence warning with GCC -Wextra
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-31 23:48:33 +00:00
Vadim Zeitlin
8c3b65d941 rename ShowCacheStats to wxStrCacheStatsDumper
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-31 15:07:12 +00:00
Vadim Zeitlin
ad8ae78878 call GetCache() from a global object ctor to ensure that it is done before any threads are created
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-31 14:57:53 +00:00
Vadim Zeitlin
0514adaf75 fix compilation for wxUSE_STD_STRING==0 case after latest change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-31 14:41:26 +00:00
Vadim Zeitlin
302acc453d define wxString::iterator::iterator_category correctly if wxUSE_STD_STRING and not only if wxUSE_STL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-31 14:15:05 +00:00
Vadim Zeitlin
8b73c5318c chanegd wxTlsValue to be pointer-like instead of value-like which doesn't work for UDTs; use __thread keyword with mingw32 >= 4.3 too; use library-based thread-specific variables support in wxString cache now that it is fixed to work there; finally added a unit test for TLS stuff
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-29 23:28:42 +00:00
Vadim Zeitlin
b053bf9ef4 don't use new string caching code without compiler TLS support (temporary fix to compilation problems)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-28 21:50:10 +00:00
Vadim Zeitlin
af912213b3 compilation fix for non-UTF-8 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-28 19:39:23 +00:00
Vadim Zeitlin
68482dc584 add cache for last used position and string length to UTF-8 wxString, dramatically improving performance of the code using indices to iterate over strings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-28 19:19:11 +00:00
Václav Slavík
6bd4f2812d fixed writing to wxUniCharRef after its 'parent' iterator was destroyed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-26 13:02:38 +00:00
Vadim Zeitlin
dd79ca2fd8 undid changes accidentally committed as part of r55019
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-08 19:00:19 +00:00
Vadim Zeitlin
64a044d5a6 added wxTLS_TYPE() macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-08 02:59:32 +00:00
Vadim Zeitlin
0c7db140c5 add wxString::Capitalize() and MakeCapitalized() for consistency with Upper/Lower() we already have
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-01 23:39:11 +00:00
Vadim Zeitlin
96e93f5b83 added FromUTF8Unchecked() for ANSI build too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-21 02:26:11 +00:00
Vadim Zeitlin
cc209a518f check that string passed to FromUTF8() is valid even in release build, this is safer; add a separate FromUTF8Unchecked() which can be used for maximal efficiency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-19 19:59:59 +00:00
Robert Roebling
6ad68ad8c8 added wxString.t_str() and used it in filefn.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-04 07:56:32 +00:00
Vadim Zeitlin
39329d2edd use memcpy() instead of wxTmemcpy() as the latter is defined in wx/wxcrt.h which includes wx/string.h and hence can't be used from here
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-07 15:12:23 +00:00
Vadim Zeitlin
062dc5fc22 initialize wxStringBuffer with the original contents of wxString it was created from for better compatibility with the old, non-STL, build (this avoids problems such as ticket #4845); add wxString::tchar_buf() to help with the implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-06 21:19:23 +00:00
Václav Slavík
06e9cf134f added wxString::Clone() and made wxString(wxCStrData) ctor make deep copy too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-24 07:16:48 +00:00
Václav Slavík
f416695a1b more wxString:[Aa]ppend() overloads for better compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-14 22:30:07 +00:00
Vadim Zeitlin
9ef1ad0d2c fix crashes due to missing npos handling in several wxString methods in STL build (bug 1941352); add an assert to ensure this bug doesn't occur in the future
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-13 23:41:15 +00:00
Vadim Zeitlin
0367b92891 document Alloc() vs returning bool (part of bug 1933693)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-05 17:50:16 +00:00
Vadim Zeitlin
9b4da62701 PalmOS compilation fixes (wx-trunk-out.diff part of patch 1894861)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-02 00:43:06 +00:00
Václav Slavík
84d2877f32 UTF-8 build fixes for appending, setting or searching for NUL characters
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-27 16:29:52 +00:00
Paul Cornett
162e998c2f check for self-assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-09 04:08:33 +00:00
Václav Slavík
2712e31795 don't call wxString::Len() from operator==; use IsSameAs() instead of move the length check to there (for non-UTF8 builds)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-07 10:27:35 +00:00
Vadim Zeitlin
b5343e065a only provide ptrdiff_t versions of verious operator+/- working with iterators instead of overloads for both int and size_t: this seems to be enough and the existing overloads were not enough for 64 bit builds where expressions such as iter+(ptr2-ptr1) didn't compile without extra casts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-06 22:27:01 +00:00
Václav Slavík
d9359369af removed wxSTRING_TEXT() macro in favour of wxS()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-02 17:33:31 +00:00
Vadim Zeitlin
f172cb8200 removed support for Salford compiler (which was almost certainly broken anyhow) (patch 1861133)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-31 10:05:00 +00:00
Vadim Zeitlin
9183da066e no need to reenable VC warning 4251 now as it's globally disabled in wx/defs.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-20 00:55:03 +00:00
Stefan Csomor
c47e732c7a fn_str encoding symmetry fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-08 17:33:29 +00:00
Stefan Csomor
623633eea9 cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-16 20:52:54 +00:00
Paul Cornett
04848a06ca revert calling static directly, its not always static
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-26 17:31:18 +00:00
Paul Cornett
326a863afc use class keyword to match forward decl, call static members directly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-26 06:19:27 +00:00
Václav Slavík
6a6ea041d9 compilation fix for Mingw: it doesn't have std::wostream
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-10 09:48:00 +00:00
Vadim Zeitlin
6b61b594cf define insertion operator in std::wostream in Unicode build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-10-09 00:09:01 +00:00