Depending on preprocessor settings, certain parameters may or may
not be used. Instead of casing to (void) when not used, it's easier
to use C++17's [[maybe_unused]] attribute to express this.
These overrides existed to prevent MSVC errors related to duplicate
compiler warnings. Because we required a version of CMake older
3.15, CMake would add /W3 as a default compiler flag when using
MSVC. We then add /W4 in addition to that. Modern CMake versions
seem to deduplicate these warnings but older versions did not.
The easist fix is to raise the minimum CMake version to 3.15 which
changes the default behavior to no longer add /W3 without being
explicitly specified. See the below link for more information about
this behavior change.
https://cmake.org/cmake/help/latest/policy/CMP0092.html
Both ApproxVec and ApproxDeg accept a double then convert that to
a float just to then convert it back to a double. We can save an
extra lossy conversion by just accepting a float instead of a double
in the first place.
The previous documentation talks about 'end points' but the current code does not take end point as an argument and hence does not allow specifying the end point of the loop. (Instead the functions allows specifying the beginning offset and the length of the loop.)
Ported sfml-pi DRM/KMS backend written by @mickelson
Port co-authored by @substring
Co-authored-by: Andrew Mickelson <andrew.mickelson@gmail.com>
Co-authored-by: Gil Delescluse <frog2wah@gmail.com>
This is helpful when debugging why files won't load. By printing
the whole path we're making it more clear to the user exactly what
file is failing to load.
This has been a recurring problem. I had to add similar code to the
sf::Angle operator<< because I was getting tiny floating point
differences that after rounding were imperceptable.