Sam Hocevar
03c17fcae4
base: clean up and refactor containers.
The containers no longer force the user to use the ptrdiff_t type for
size information. For convenience, size() now always returns an int,
and the size_s() method offers a way to handle arrays with more than
2 billion elements. Internally, we still use ptrdiff_t, though.
Since so much code had to be changed, I took the opportunity to get
rid of capitalised accessors for classes that are lowercase.
10 jaren geleden
Sam Hocevar
2b3f1aa0d5
build: reactivate array::Insert.
10 jaren geleden
Benjamin ‘Touky’ Huet
e05b399514
FFS BUILD
10 jaren geleden
Benjamin ‘Touky’ Huet
2aa7a33aca
Added Insert in tuple array
10 jaren geleden
Sam Hocevar
cd988786b9
build: reorganise includes so that we can use precompiled headers later.
10 jaren geleden
Sam Hocevar
6b64e2c337
lolunit: switch assert macros to lowercase.
10 jaren geleden
Sam Hocevar
cadc4d18b0
test: move the unit tests to the engine, and lolunit out of the engine.
10 jaren geleden
Sam Hocevar
fe665f85b4
base: strip core.h from its contents and put it in public/private headers.
10 jaren geleden
Sam Hocevar
398ee1b4d5
base: use lol::array in most places.
10 jaren geleden
Sam Hocevar
7b8e56c730
base: fix array initialiser and add more unit tests.
10 jaren geleden
Sam Hocevar
59a157a58c
build: port solution to VS2013. Muahahaha.
10 jaren geleden
Sam Hocevar
90786652e8
base: fix Array::Insert to avoid copying the whole array and add a unit test.
10 jaren geleden
Sam Hocevar
ef0bd031ab
base: Array::Remove(int) now accepts a negative index to remove elements
from the end. Also added Array::RemoveSwap() for faster removes at the
expense of element ordering.
11 jaren geleden
Sam Hocevar
94acb0f519
build: the “fuck you, Apple” commit; work around three different
compiler bugs in the Xcode toolchain.
12 jaren geleden
Sam Hocevar
5ea012c192
base: add Array::Swap() method and the corresponding unit test.
12 jaren geleden
Sam Hocevar
3973f80a9d
base: fix a nasty double free issue in Array::Remove().
12 jaren geleden
Benjamin ‘Touky’ Huet
c7219ff1dd
New year copyright update.
12 jaren geleden
Sam Hocevar
d6634da83f
build: fix the WTFPL site URL in all code comments.
12 jaren geleden
Sam Hocevar
d0dbbde159
core: allow to concatenate arrays, and add unit tests for that.
13 jaren geleden
Sam Hocevar
82aaaae62c
core: the Array class now properly works with non-POD types.
13 jaren geleden
Sam Hocevar
0315413285
core: rename Array::Append() to Array::Push() for brevity and arbitrary
personal taste.
13 jaren geleden
Sam Hocevar
c9520d2aca
test: add unit tests for the Array class.
13 jaren geleden