mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +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. |
||
---|---|---|
.. | ||
aio.cpp | ||
bezier.cpp | ||
blocklist_driver.cpp | ||
bytes_be.cpp | ||
color.cpp | ||
compression.cpp | ||
csv.cpp | ||
datafile.cpp | ||
fs.cpp | ||
git_revision.cpp | ||
hash.cpp | ||
huffman.cpp | ||
io.cpp | ||
jobs.cpp | ||
json.cpp | ||
linereader.cpp | ||
mapbugs.cpp | ||
name_ban.cpp | ||
net.cpp | ||
netaddr.cpp | ||
os.cpp | ||
packer.cpp | ||
prng.cpp | ||
score.cpp | ||
secure_random.cpp | ||
serverbrowser.cpp | ||
serverinfo.cpp | ||
str.cpp | ||
strip_path_and_extension.cpp | ||
teehistorian.cpp | ||
test.cpp | ||
test.h | ||
thread.cpp | ||
unix.cpp | ||
uuid.cpp |