Update to 12.0-beta1

This commit is contained in:
dP
2021-08-15 14:57:29 +03:00
parent ac7d3eba75
commit 9df4f2c4fc
666 changed files with 61302 additions and 20466 deletions

View File

@@ -33,9 +33,9 @@ DEFINE_POOL_METHOD(inline)::Pool(const char *name) :
first_free(0),
first_unused(0),
items(0),
#ifdef OTTD_ASSERT
#ifdef WITH_ASSERT
checked(0),
#endif /* OTTD_ASSERT */
#endif /* WITH_ASSERT */
cleaning(false),
data(nullptr),
alloc_cache(nullptr)
@@ -133,10 +133,10 @@ DEFINE_POOL_METHOD(void *)::GetNew(size_t size)
{
size_t index = this->FindFirstFree();
#ifdef OTTD_ASSERT
#ifdef WITH_ASSERT
assert(this->checked != 0);
this->checked--;
#endif /* OTTD_ASSERT */
#endif /* WITH_ASSERT */
if (index == NO_FREE_ITEM) {
error("%s: no more free items", this->name);
}