Age | Commit message (Collapse) | Author |
|
|
|
Removed whitespace before template keyword.
Made template types camel case starting with lowercase.
|
|
The input and output type can be different.
Currently, rad2deg is only being used by sci (float to int)
and deg2rad in wintermute.
|
|
The register keyword was deprecated from the C++11 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809>,
and removed from the C++17 standard,
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4340>, so
cannot exist in a well-formed C++17 program.
It has never done anything in GCC
<https://gcc.gnu.org/ml/gcc/2010-05/msg00113.html>
and because of the way it is specified in the standard, it is “as
meaningful as whitespace”
<http://www.drdobbs.com/keywords-that-arent-or-comments-by-anoth/184403859>.
The one remaining use of the register keyword is in the DS backend,
where it is used to create a local register variable using the
non-standard GCC Extended Asm feature.
Closes gh-1079.
|
|
Since we take a float parameter and return a float value we will also just
work on float values all the way. This silences some float conversion
warnings.
|
|
|
|
This should have no effect on common/math.h as scummsys is included at
the top anyway, but this will fix compilation on some toolchains when
strict ANSI language compliance is enabled i.e. -std=c++11, rather than
-std=gnu11.
This causes an issue as a side effect is to set a guard which disables
various non-standard defines in the system headers i.e. the M_PI and
M_SQRT1_2 constant definitions in the MinGW x86_64 toolchain on
buildbot.
By moving this into scummsys.h after the point of system math.h
inclusion, we can ensure that M_PI etc. are always present.
|
|
|
|
|
|
Older gcc versions did not include __builtin_clz, which made the PS2 port
fail to compile, since it uses 3.2.2.
|
|
This is done as discussed here:
https://github.com/scummvm/scummvm/commit/54f25aa84373715001c56155673fb59cfe44b573
|
|
-1 for 0.
|
|
Access is now restricted to using the getSineTable()/getCosineTable() helper functions.
|
|
This avoids naming collisions with system libraries on some platforms
i.e. DS, DC where the log2 is realised by macro.
|
|
|
|
|
|
|
|
|
|
|
|
Based on eos' code
|