dxx-rebirth/similar
Kp 2eda0d98ee Add workaround for Win32 array::size() triggering -Wuseless-cast
As described in commit 674a921 ("Add workaround for Win32 wrong type for
size_t"), std::array on Win32 returns type std::size_t, which is
`unsigned int` instead of the `unsigned long` seen on Linux.  Calling
std::min requires both arguments to have the same type.  On Linux, this
required casting the result of size() to `unsigned` to match the other
input.  On Win32, that cast provokes a -Wuseless-cast warning.  Add a
workaround by removing the cast and instead explicitly setting the type
of std::min's arguments to `unsigned`, then relying on the compiler to
perform an implicit conversion from `unsigned long` to `unsigned int`
on Linux.  The value is always small enough to fit in an `unsigned int`,
so no precision loss will occur.
2016-08-19 03:41:42 +00:00
..
2d Remove useless cast in similar/2d/pcx.cpp 2016-08-17 04:44:22 +00:00
3d Convert various static const expressions to constexpr 2016-07-16 16:52:04 +00:00
arch Remove useless casts in similar/arch/ogl/ogl.cpp 2016-08-17 04:44:22 +00:00
editor Add helper macro to handle printf .* conversion for 32/64 2016-08-19 03:41:41 +00:00
main Add workaround for Win32 array::size() triggering -Wuseless-cast 2016-08-19 03:41:42 +00:00
misc Remove char[N] overload for PHYSFSX_getRealPath 2016-08-06 19:55:25 +00:00