mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-22 02:24:17 +00:00
db4ec4a12d
Replacing the C standard headers with the C++ standard headers causes various `error: call to 'floor' promotes float to double [performance-type-promotion-in-math-fn,-warnings-as-errors]`, which are fixed by using the C++ std math functions or our own math functions instead of the C math functions. - Use `absolute` instead of `abs` and `fabs`. - Use `std::floor` instead of `floor` and `floorf`. - Use `std::ceil` instead of `ceil`, `ceilf` and `round_ceil`. - Use `std::round` instead of `round` and `roundf`. - Use `std::sin` instead of `sin` and `sinf`. - Use `std::asin` instead of `asin` and `asinf`. - Use `std::cos` instead of `cos` and `cosf`. - Use `std::acos` instead of `acos` and `acosf`. - Use `std::tan` instead of `tan` and `tanf`. - Use `std::atan` instead of `atan` and `atanf`. - Use `std::pow` instead of `pow` and `powf`. - Use `std::log` instead of `log` and `logf`. - Use `std::log2` instead of `log2` and `log2f`. - Use `std::log10` instead of `log10` and `log10f`. - Use `std::pow` instead of `pow` and `powf`. - Use `std::sqrt` instead of `sqrt` and `sqrtf`. - Use `std::fmod` instead of `fmod` and `fmodf`. - Use `direction(Angle)` instead of `vec2(std::cos(Angle), std::sin(Angle))`. - Use `length(vec2(x, y))` instead of `std::sqrt(x * x + y * y)`. - Remove unused `NormalizeAngular` and `AngularDistance` functions. |
||
---|---|---|
.. | ||
backend | ||
backend_sdl.cpp | ||
backend_sdl.h | ||
blocklist_driver.cpp | ||
blocklist_driver.h | ||
checksum.h | ||
client.cpp | ||
client.h | ||
demoedit.cpp | ||
demoedit.h | ||
discord.cpp | ||
favorites.cpp | ||
friends.cpp | ||
friends.h | ||
ghost.cpp | ||
ghost.h | ||
graphics_defines.h | ||
graphics_threaded.cpp | ||
graphics_threaded.h | ||
input.cpp | ||
input.h | ||
keynames.h | ||
notifications.cpp | ||
notifications.h | ||
serverbrowser.cpp | ||
serverbrowser.h | ||
serverbrowser_http.cpp | ||
serverbrowser_http.h | ||
serverbrowser_ping_cache.cpp | ||
serverbrowser_ping_cache.h | ||
sound.cpp | ||
sound.h | ||
sqlite.cpp | ||
steam.cpp | ||
text.cpp | ||
updater.cpp | ||
updater.h | ||
video.cpp | ||
video.h |