summaryrefslogtreecommitdiff
path: root/src/core/pool_func.hpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-01-08 10:16:18 +0000
committerGitHub <noreply@github.com>2021-01-08 11:16:18 +0100
commit9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch)
tree3f287d339e15c4902ee415556475fd9b2918d33c /src/core/pool_func.hpp
parentc1fddb9a6ae5c3af6865461a7295788a341011a2 (diff)
downloadopenttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/core/pool_func.hpp')
-rw-r--r--src/core/pool_func.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/pool_func.hpp b/src/core/pool_func.hpp
index db79ab285..dea108f08 100644
--- a/src/core/pool_func.hpp
+++ b/src/core/pool_func.hpp
@@ -52,7 +52,7 @@ DEFINE_POOL_METHOD(inline void)::ResizeFor(size_t index)
assert(index >= this->size);
assert(index < Tmax_size);
- size_t new_size = min(Tmax_size, Align(index + 1, Tgrowth_step));
+ size_t new_size = std::min(Tmax_size, Align(index + 1, Tgrowth_step));
this->data = ReallocT(this->data, new_size);
MemSetT(this->data + this->size, 0, new_size - this->size);
@@ -100,7 +100,7 @@ DEFINE_POOL_METHOD(inline void *)::AllocateItem(size_t size, size_t index)
{
assert(this->data[index] == nullptr);
- this->first_unused = max(this->first_unused, index + 1);
+ this->first_unused = std::max(this->first_unused, index + 1);
this->items++;
Titem *item;
@@ -187,7 +187,7 @@ DEFINE_POOL_METHOD(void)::FreeItem(size_t index)
free(this->data[index]);
}
this->data[index] = nullptr;
- this->first_free = min(this->first_free, index);
+ this->first_free = std::min(this->first_free, index);
this->items--;
if (!this->cleaning) Titem::PostDestructor(index);
}