Closed traversaro closed 5 years ago
In the time.cpp file, there are several points in which UINT_MAX is used as the maximum value for 32-bit unsigned integers (i.e. uint32_t):
time.cpp
UINT_MAX
uint32_t
While UINT_MAX is indeed the maximum value for 32-bit unsigned integers for the commonly used 64-bit data models (see http://www.unix.org/version2/whatsnew/lp64_wp.html , https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models ) there are a few platform for which it should be a more appropriate to use explicitly the 32-bit unsigned maximum, i.e. UINT32_MAX.
UINT32_MAX
Unfortunately, I far as I understand UINT32_MAX is standard only since C++11, so I don't know a clean way to fix this using C++98 .
In the
time.cpp
file, there are several points in whichUINT_MAX
is used as the maximum value for 32-bit unsigned integers (i.e.uint32_t
):While
UINT_MAX
is indeed the maximum value for 32-bit unsigned integers for the commonly used 64-bit data models (see http://www.unix.org/version2/whatsnew/lp64_wp.html , https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models ) there are a few platform for which it should be a more appropriate to use explicitly the 32-bit unsigned maximum, i.e.UINT32_MAX
.Unfortunately, I far as I understand
UINT32_MAX
is standard only since C++11, so I don't know a clean way to fix this using C++98 .