resolve std::numeric_limits::max() max(a, b) conflict (#158)

This commit is contained in:
0x280 2024-01-30 12:52:12 +01:00 committed by GitHub
parent e8d8bdd2b3
commit 178ab8ee22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -63,7 +63,7 @@ namespace rage
auto value_array_size = value_array.size();
auto old_capacity = m_count;
if ((value_array_size + m_count) > std::numeric_limits<uint16_t>::max())
if ((value_array_size + m_count) > (std::numeric_limits<uint16_t>::max)())
return false;
auto size = (uint16_t)value_array_size;
@ -84,7 +84,7 @@ namespace rage
auto value_array_size = value_array.size();
auto old_capacity = m_count;
if ((value_array_size + m_count) > std::numeric_limits<uint16_t>::max())
if ((value_array_size + m_count) > (std::numeric_limits<uint16_t>::max)())
return false;
auto size = (uint16_t)value_array_size;
@ -105,7 +105,7 @@ namespace rage
auto value_array_size = value_array.size();
auto old_capacity = m_count;
if ((value_array_size + m_count) > std::numeric_limits<uint16_t>::max())
if ((value_array_size + m_count) > (std::numeric_limits<uint16_t>::max)())
return false;
auto size = (uint16_t)value_array_size;