Commit Graph

68 Commits

Author SHA1 Message Date
Paul Cornett
872051d89b avoid GCC warning about type-punned pointer breaking strict aliasing rules
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-14 18:15:28 +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
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Václav Slavík
092793cb6d compilation fix for --disable-compat28
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-29 17:02:10 +00:00
Václav Slavík
47b378bd88 removed extra semicolons (patch #1700459; fixes compilation with gcc's -pedantic flag)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-14 09:58:37 +00:00
Václav Slavík
ad78ab8c50 made wxHashMap work with any form of strings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-28 09:46:46 +00:00
Michael Wetherell
b158be6e47 Use hash<long> instead of hash<wxLongLong_t> when they are the same size
since even some 64-bit compilers have a problem with it, it seems.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-03 21:32:39 +00:00
Michael Wetherell
ec2f62b19d Use the standard hash<wxLongLong_t> on 64-bit machines.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-02 21:48:56 +00:00
Vadim Zeitlin
fae803f27b fix for longlongHash for architectures where sizeof(long long) == sizeof(long)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-01 14:08:04 +00:00
Włodzimierz Skiba
df69528b7e Include wx/hashmap.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-20 10:24:07 +00:00
Vadim Zeitlin
cd4e32afe7 added conversion ctor to create const_iterator from iterator, otherwise assigning the return value of begin() called on a non-const object to a const_iteator didn't work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-08 23:26:39 +00:00
Vadim Zeitlin
3952889a90 really fix warning about implicitly converting 0 and 1 to size_t -- use explicit cast to size_type
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-09 22:47:46 +00:00
Vadim Zeitlin
2ed8c8dd1f some compilers warn about implicitly converting 0 and 1 to size_t -- use 0u and 1u instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-06 23:45:14 +00:00
Mart Raudsepp
fc2e1beec2 Revert the strict aliasing "fix". As per Michael Wetherell it isn't correct as we aren't able to make a runtime
guarantee for the cast to be correct


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-25 14:51:59 +00:00
Mart Raudsepp
9a71e770e1 Cast to void* before casting to Node** to make the compiler do no strict-aliasing assumptions, and suppress a warning
if -fstrict-aliasing (enabled with -O2, -O3 and -Os unless forced off as is planned for the time being) is used.
See http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/70262 for details.
Also return NULL instead of 0 in the same GetNodePtr, as the return type is a pointer, not integer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37575 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-14 09:21:37 +00:00
Vadim Zeitlin
e786a78b1c removed a few more extra semicolons (patch 1425785)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-02-08 13:04:14 +00:00
Julian Smart
3f5c62f982 Reverted semicolons patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-18 16:45:41 +00:00
Julian Smart
edef87c827 Applied patch [ 1399013 ] More removals of extraneous semicolons
Wlodek Szafran


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-18 11:46:53 +00:00
Michael Wetherell
7c6c0acf9d Silence warning from bcc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-12-01 14:30:30 +00:00
Michael Wetherell
8875e7ad84 Only define wxIntegerHash::longlongHash when long long isn't long
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-11-26 13:40:54 +00:00
Michael Wetherell
30e1369517 Remove cast of hash value to unsigned long, hash value can be bigger
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-27 19:24:47 +00:00
Michael Wetherell
bfe1edbddb Add hashes for long long keys
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-27 19:08:55 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Julian Smart
106d80ad37 Applied patch [ 1195797 ] Fixes to compile on Win64
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-05-22 12:10:55 +00:00
Mattia Barbon
f5db5af932 Untabify.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-01-04 17:41:47 +00:00
Robert Roebling
86baa52d22 Applied patch to "correct" hashmap's freeing
of memory.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-12-01 18:33:33 +00:00
Vadim Zeitlin
f12885449a use wxPtrToUInt instead of (lossy) wxPtrToULong
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-15 20:35:39 +00:00
Włodzimierz Skiba
5d3e7b52d8 Source cleaning: whitespaces, tabs, FALSE/false, TRUE/true, -1/wxDefaultCoord, !!/!IsEmpty().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-15 13:20:18 +00:00
Robin Dunn
e1688485fd Avoid warnings in the DLL builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-31 21:05:38 +00:00
Vadim Zeitlin
fe8604acce insert now returns pair<iterator, bool>, as for the standard map
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-25 23:05:28 +00:00
Robert Roebling
68c30476e7 Compile fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27752 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-06-11 19:13:49 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Robin Dunn
0fab3a5a1a Avoid duplicated definition errors for wxLongToLongHashMap when both
grid.h and fs_zip.h are included.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-10 20:50:28 +00:00
Mattia Barbon
bdcade0a10 When wxUSE_STL == 1 and STL provides quasi-standard hash_map/hash_set,
wxHashMap/wxHashSet are just typedefs for them. This makes impossible
to forward declare these classes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-08 20:20:24 +00:00
Mattia Barbon
1a6d9c7680 New wxHashTable implementation when wxUSE_STL == 1. Replaces
the old implementation based upon wxHashMap. Removed support
for wxHashTable in wxHashMap.
  Rationale: using wxHashMap for wxHashTable implementation required
special support in wxHashMap. This precluded using STL-provided
hash_map to implement wxHashMap. This new implementation does not
use keyed wxList interface and should be almost totally compatible
with the old non-STL wxHashTable.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-11-23 08:12:34 +00:00
Mattia Barbon
d8771ac734 Fixed bug introduced in fs_zip.cpp when replacing wxHashTableLong
with wxHashMap.
  Made wxHashMap constructor explicit to prevent similar errors.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-29 20:10:32 +00:00
Mattia Barbon
8ae94823a3 Keep order of nodes when wxHashMap is resized; this ensures
that wxHashTable has the same behaviour when wxUSE_STL=1 as
when wxUSE_STL=0.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-20 16:59:17 +00:00
Mattia Barbon
760d3c7cd3 Fixes for wxHashTable when wxUSE_STL=1:
wxHashTable must work like an hash_multimap, not an hash_map.
wxHashTable::Delete is supposed to actually delete entries
more tests in console sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-19 21:17:04 +00:00
Václav Slavík
1202890513 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:38:21 +00:00
Václav Slavík
c0421c9993 added *_WITH_DECL macros so that it is possible to export hashes from
DLLs other than wxCore


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-27 22:35:02 +00:00
Mattia Barbon
3d16b99ece Remove single-argument constructor of wxHashMap::value_type.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-23 19:26:32 +00:00
Julian Smart
0be9ace27e Added RTL functions missing from WinCE to wxchar.h/cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-15 13:46:39 +00:00
Julian Smart
529b7f71bd Small tweaks for WinCE compatibility
Use generic folder dialog for WinCE


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-15 13:15:48 +00:00
Vadim Zeitlin
486f0e76c2 removed a :: from WX_CLEAR_HASHMAP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21895 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-11 19:01:55 +00:00
Julian Smart
7f0586ef60 Some WinCE fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-10 21:14:50 +00:00
Mattia Barbon
df5168c427 Added --use-stl to cnfigure, wxUSE_STL to setup0.h
Moved wx/datetime.inl contents to wx/datetime.h and removed
inline redefinition hack.
  Implemented STL-like interface on top of wxList/wxArray, when wxUSE_STL=0.
  Implemented wxList-like and wxArray interfaces on top of std::list and
std::vector, when wxUSE_STL=1.
  Added arrstr.h, moved wxArrayString declaration there; string.h
#includes arrstr.h only if WXWIN_COMPATIBILITY_2_4 is enabled.
  Added WX_CLEAR_HASH_MAP, WX_CLEAR_HASH_TABLE, WX_CLEAR_LIST macros,
to clear a wxHashMap, wxHashTable, wxList containing pointers: deletes
pointers and makes container zero-sized.
  When wxUSE_STL=1, wxStringList works like a std::list<wxString>.
  Made wxBase compile when wxUSE_STL=1.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21768 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-08 19:52:35 +00:00
Mattia Barbon
ddf5de5b46 Applied first part of Roger Gammans' wxHashMap patch: reduce
number of value_type() constructor calls.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-04 21:22:05 +00:00
Vadim Zeitlin
bddd7a8d89 renamed WXDLLEXPORT_BASE/CORE to WXDLLIMPEXP_BASE/CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21570 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-02 01:59:24 +00:00
Vadim Zeitlin
886dd7d28e fixes needed for separate DLL build to work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-02 01:41:23 +00:00