|
OpenTTD Source 20261129-master-g72a8bdc861
|
An overflow safe integer-like type. More...
#include "math_func.hpp"Go to the source code of this file.
Data Structures | |
| class | OverflowSafeInt< T > |
| Overflow safe template for integers, i.e. More... | |
Typedefs | |
| using | OverflowSafeInt64 = OverflowSafeInt<int64_t> |
| A 64-bit overflow safe type. | |
| using | OverflowSafeInt32 = OverflowSafeInt<int32_t> |
| A 32-bit overflow safe type. | |
Functions | |
| template<typename To, typename From> | |
| constexpr To | ClampTo (OverflowSafeInt< From > value) |
An overflow safe integer-like type.
Definition in file overflowsafe_type.hpp.
| using OverflowSafeInt32 = OverflowSafeInt<int32_t> |
A 32-bit overflow safe type.
Definition at line 278 of file overflowsafe_type.hpp.
| using OverflowSafeInt64 = OverflowSafeInt<int64_t> |
A 64-bit overflow safe type.
Definition at line 275 of file overflowsafe_type.hpp.
|
constexpr |
Definition at line 288 of file overflowsafe_type.hpp.