Commit Graph

24 Commits

Author SHA1 Message Date
Peter Nelson b4e00fa738
Codechange: Replace C-casts in pool functions. (#12541) 2024-04-20 16:50:13 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Peter Nelson 2ecc3c90f7
Change: Improve performance of finding free pool slots. (#12055)
Add a bitmap of used pool slots which allows finding a free pool slot without having to check if each index is already used or not.

Loosely based on a JGRPP patch.
2024-02-17 18:29:21 +00:00
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
Charles Pigott 8aea13a85b Codechange: Use fmt for SlErrorCorruptFmt 2023-04-10 18:58:48 +01:00
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 2023-01-29 20:28:45 +01:00
Patric Stout 28e90769f7 Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
2021-06-03 17:30:00 +02:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
PeterN c0c8fb25fb
Change: Use SlErrorCorrupt() on pool index error when loading a savegame, instead of terminating. (#7219) 2019-02-13 09:01:49 +00:00
michi_cc 2b8bb12d62 (svn r27381) -Fix: Warnings due to C++11 requirements for explicit narrowing conversions in initializer lists. 2015-08-10 20:24:13 +00:00
rubidium b3e93d6520 (svn r26057) -Fix: a number of possibly uninitialised variables 2013-11-23 13:12:19 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
smatz b5525fd33d (svn r23941) -Add: support for clang 2012-02-12 21:17:32 +00:00
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 2011-05-02 17:42:12 +00:00
smatz 756cc6cf65 (svn r22116) -Codechange: use PoolBase::Clean() at more places 2011-02-19 23:05:47 +00:00
smatz fbfb0ffbf2 (svn r22041) -Codechange: add a check that we called PoolItem::CanAllocateItem() before actually allocating it 2011-02-09 18:55:51 +00:00
rubidium eb299736c1 (svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n]. 2011-01-22 09:53:15 +00:00
rubidium 1528b64a68 (svn r17839) -Codechange: implement the concept of 'caching' pool items to pools, that is instead of 'free' push the unused items in a linked list and use them on 'malloc'. Also add the concept of zeroing, or actually not zeroing, on new for pool items. 2009-10-21 19:38:50 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz c861d9b64b (svn r16745) -Fix [FS#3011]: invalidate JoinStation window after removing item from the pool 2009-07-05 13:20:05 +00:00
smatz 56a7b70591 (svn r16380) -Codechange: rename pool.hpp to pool_type.hpp 2009-05-22 15:39:22 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00