Max Horn
882c24d2ee
COMMON: Check for failed memory allocations; changed Common::String to use new/delete instead of malloc/free
...
svn-id: r40291
2009-05-03 22:45:31 +00:00
Max Horn
f52a0df422
COMMON: Made Common::List::clear more efficient
...
svn-id: r40172
2009-04-28 10:23:26 +00:00
Max Horn
7f20f3bb3e
COMMON: Improved efficiency of some Common::List methods; added more unit tests and some doxygen comments for Common::List and Common::Array
...
svn-id: r40164
2009-04-27 14:25:16 +00:00
Max Horn
e579f91b5c
COMMON: Made sure Common::List and Common::array each have all front/back/push_back/push_front, as have their STL counterparts
...
svn-id: r40163
2009-04-27 14:23:20 +00:00
Max Horn
84f0e1d986
COMMON: Added Common::List::front() and back() method (similar to std::list)
...
svn-id: r40154
2009-04-27 11:11:42 +00:00
Max Horn
7db2648ba0
COMMON: Added unit test for Common::List::size(); made List::size() slightly more efficient; same for remove() and operator=
...
svn-id: r39921
2009-04-11 00:29:34 +00:00
Max Horn
5181546c63
Rewrote Common::List iterator code to ensure const correctness is preserved.
...
We tried to implement the list iterators in a clever way, to reduce code
duplication. But this is essentially impossible to do properly, sadly --
this is one of the places where the ugly drawbacks of C++ really show.
As a consequence, our implementation had a bug which allowed one to
convert any const_iterator to an iterator, thus allowing modifying
elements of const lists.
This rewrite reintroduces code duplication but at least ensures that no
const list is written to accidentally.
Also fix some places which incorrectly used iterator instead of const_iterator
or (in the kyra code) accidentally wrote into a const list.
svn-id: r39279
2009-03-09 22:26:02 +00:00
Christopher Page
e808cdf7a0
Reimplemented pushEvent() and artificialEventQueue to work with Events instead of EventTypes. Reimplemented Queue as a List instead of Array. Updated AGOS, AGI, CINE, GOB, and KYRA to work with the current implementation of the GMM
...
svn-id: r32971
2008-07-09 02:27:05 +00:00
Johannes Schickel
db04dd427d
Formatting.
...
svn-id: r31852
2008-05-03 23:02:05 +00:00
Torbjörn Andersson
06dea14540
Changed spaces to tab, thus annoying everyone who now have to do a large
...
recompile.
svn-id: r31848
2008-05-03 21:15:25 +00:00
Filippos Karapetis
dcb6d4ed06
Reverted commit #31499
...
svn-id: r31502
2008-04-14 15:59:32 +00:00
Filippos Karapetis
c2e3572fe4
Added contains() method to Common::List, same as in Common::Array
...
svn-id: r31499
2008-04-14 10:07:15 +00:00
Johannes Schickel
a614273cf0
Oops forgot to enable friend statement.
...
svn-id: r31358
2008-04-02 02:15:47 +00:00
Johannes Schickel
da9701d19b
Implemented transparent List::iterator to List::const_iterator conversion and updated our tests accordingly.
...
svn-id: r31357
2008-04-02 02:15:00 +00:00
Bertrand Augereau
78419238f9
The "anchor" (root) of the linked list is now constructed inplace in the List instead of being newed (it has the same lifetime as the List itself anyway)
...
svn-id: r31323
2008-03-30 06:37:46 +00:00
Jordi Vilalta Prat
66e9d4f5e8
Removed trailing spaces.
...
svn-id: r30664
2008-01-27 19:47:41 +00:00
Eugene Sandulenko
6505686c5a
Renamed some typedefs to avoid clashes with sky engine
...
svn-id: r28321
2007-07-30 10:18:25 +00:00
Max Horn
218e132e37
Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots
...
svn-id: r27024
2007-05-30 21:56:52 +00:00
Johannes Schickel
ad03c72bdb
Commit of patch #1715313 ("CORE: STL like algorithm implementation").
...
svn-id: r26929
2007-05-23 12:02:31 +00:00
Max Horn
728d01cb17
Removing some unnecessary #includes
...
svn-id: r26044
2007-03-09 23:46:45 +00:00
Max Horn
dea688d0f5
Fix spelling
...
svn-id: r25908
2007-02-28 14:07:47 +00:00
Chris Apers
8ad806535a
Not required anymore
...
svn-id: r24561
2006-10-28 14:40:43 +00:00
Johannes Schickel
d65e7826fd
Fixes compiling for me with g++ (GCC) 4.1.2 20061007 (prerelease) (Debian 4.1.1-16) on amd64.
...
svn-id: r24298
2006-10-13 20:18:27 +00:00
Willem Jan Palenstijn
20c4be47a3
add functions for reverse iteration of Common::List
...
svn-id: r22665
2006-05-26 17:18:23 +00:00
Max Horn
088b0afad5
Modified the List postfix ++/-- operators to simply invoke their prefix counterparts; also removed Symbian/Palm specific hack
...
svn-id: r21515
2006-03-31 22:15:42 +00:00
Max Horn
9f93e5bb81
Renamed various container isEmpty() methods to empty() to match STL conventions
...
svn-id: r21472
2006-03-28 09:42:54 +00:00
Lars Persson
0b847325e1
'Changed Symbian configuration handling so it is using the basepath of the application installation as a path for Savegames, ini files etc
...
*Updated list.h so it also compiles for Symbian codewarrior and gcce compilers
svn-id: r20586
2006-02-12 00:33:04 +00:00
Chris Apers
32b2efb8d7
This seems to definitively fix my compilation problem
...
svn-id: r20554
2006-02-11 18:02:13 +00:00
Max Horn
36934b611d
Change CVS keywords to SVN keywords
...
svn-id: r20510
2006-02-11 09:53:53 +00:00
Jonathan Gray
38ae101bde
cyx's gcc 2.95 fix makes things compile with gcc 2.95 again.
...
svn-id: r20288
2006-01-29 03:44:13 +00:00
Eugene Sandulenko
ea42bad781
Update copyright notice
...
svn-id: r20088
2006-01-18 17:39:49 +00:00
Eugene Sandulenko
b36677af71
Update FSF address. Eek. Actually that took place on May 1, 2005
...
svn-id: r19142
2005-10-18 01:30:26 +00:00
Chris Apers
1dc00deb56
Fixed compilation
...
svn-id: r18745
2005-09-03 16:10:08 +00:00
Eugene Sandulenko
6b4484472b
Remove trailing whitespaces.
...
svn-id: r18604
2005-07-30 21:11:48 +00:00
Max Horn
5059e710e8
Fix postfix inc/decrement operators of List::Iterator
...
svn-id: r18465
2005-06-25 19:43:59 +00:00
Lars Persson
1c69696a9a
Patches needed to build for SYMBIAN32 WINS/GCC added.
...
Test built for Symbian and run on P910i without any major problems.
Test built for MSVC6. Changed parts seems to compile ok but there are some problems with MSVC6 and some of the targets which the EPOC build does n't support (KYRA,SAGA).
svn-id: r18430
2005-06-21 22:08:21 +00:00
Eugene Sandulenko
4cf368cbcb
Fix compilation
...
svn-id: r18017
2005-05-10 00:45:39 +00:00
Paweł Kołodziejski
c1ce66efb6
fixed compilation for evc4 and vc7
...
svn-id: r18013
2005-05-09 22:39:16 +00:00
Max Horn
cca744f69a
Comply to our coding conventions
...
svn-id: r17975
2005-05-08 21:49:52 +00:00
Max Horn
03d4a6fa47
Removing obsolete comment
...
svn-id: r16401
2005-01-01 17:52:17 +00:00
Max Horn
47280d9433
Updated copyright
...
svn-id: r16398
2005-01-01 16:09:25 +00:00
Max Horn
ede24fabe2
Patch #1083548 (common/list enhancement)
...
svn-id: r16046
2004-12-14 20:57:23 +00:00
Max Horn
1ded9cff77
Optimized List assignment operator, thanks to h00ligan
...
svn-id: r16042
2004-12-12 21:54:33 +00:00
Max Horn
9e4a529ef9
Hide iterator implementation details from client code
...
svn-id: r16041
2004-12-12 21:38:11 +00:00
Max Horn
7804b57632
Added default iterator constructor, for convenience
...
svn-id: r13808
2004-05-08 19:34:06 +00:00
Max Horn
40afd9b566
Fixed const iterator
...
svn-id: r13591
2004-04-16 22:04:32 +00:00
Max Horn
2a02291537
simple double linked list template class (completely untested)
...
svn-id: r13555
2004-04-12 01:19:26 +00:00
Max Horn
8a69ffc46c
Renamed template class 'List' to 'Array', since that is really what it is (a resizable array, not a linked list)
...
svn-id: r13520
2004-04-09 15:10:23 +00:00
Eugene Sandulenko
759c05f936
Added remove_at method
...
svn-id: r13297
2004-03-15 02:45:40 +00:00
Max Horn
f59eb3b219
renamed (Const)Iterator to (const_)iterator; changed size() to return an uint
...
svn-id: r12722
2004-02-05 00:19:57 +00:00