mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Less compiler warnings
This commit is contained in:
parent
ed43827a4e
commit
763a7e23eb
12
readme.md
12
readme.md
@ -169,9 +169,9 @@ Further information (e.g. style) for the game's source code can be found in the
|
||||
|
||||
## Open source technologies
|
||||
|
||||
* curl - HTTP/HTTPS for linux and macOS
|
||||
* FreeType - Font handling for all platforms
|
||||
* GCC - Compiles client for linux
|
||||
* MinGW-w64 - Compiles client for windows
|
||||
* Clang - Compiles client for macOS
|
||||
* Emscripten - Compiles client for web
|
||||
* [curl](https://curl.se/) - HTTP/HTTPS for linux and macOS
|
||||
* [FreeType](https://www.freetype.org/) - Font handling for all platforms
|
||||
* [GCC](https://gcc.gnu.org/) - Compiles client for linux
|
||||
* [MinGW-w64](http://mingw-w64.org/doku.php) - Compiles client for windows
|
||||
* [Clang](https://clang.llvm.org/) - Compiles client for macOS
|
||||
* [Emscripten](https://emscripten.org/) - Compiles client for web
|
||||
|
@ -17,8 +17,6 @@ int Math_AbsI(int x) { return abs(x); /* MSVC intrinsic */ }
|
||||
|
||||
double Math_Sin(double x) { return sin(x); }
|
||||
double Math_Cos(double x) { return cos(x); }
|
||||
double Math_Log(double x) { return log(x); }
|
||||
double Math_Exp(double x) { return exp(x); }
|
||||
|
||||
float Math_SinF(float x) { return (float)Math_Sin(x); }
|
||||
float Math_CosF(float x) { return (float)Math_Cos(x); }
|
||||
@ -76,23 +74,23 @@ cc_bool Math_IsPowOf2(int value) {
|
||||
return value != 0 && (value & (value - 1)) == 0;
|
||||
}
|
||||
|
||||
double Math_FastLog(double x) {
|
||||
double Math_Log(double x) {
|
||||
/* x = 2^exp * mantissa */
|
||||
/* so log(x) = log(2^exp) + log(mantissa) */
|
||||
/* so log(x) = exp*log(2) + log(mantissa) */
|
||||
|
||||
/* so log(x) = log(2^exp) + log(mantissa) */
|
||||
/* so log(x) = exp*log(2) + log(mantissa) */
|
||||
/* now need to work out log(mantissa) */
|
||||
return 0;
|
||||
|
||||
return log(x);
|
||||
}
|
||||
|
||||
double Math_FastExp(double x) {
|
||||
double Math_Exp(double x) {
|
||||
/* let x = k*log(2) + f, where k is integer */
|
||||
/* so exp(x) = exp(k*log(2)) * exp(f) */
|
||||
/* so exp(x) = exp(log(2^k)) * exp(f) */
|
||||
/* so exp(x) = 2^k * exp(f) */
|
||||
|
||||
/* so exp(x) = exp(k*log(2)) * exp(f) */
|
||||
/* so exp(x) = exp(log(2^k)) * exp(f) */
|
||||
/* so exp(x) = 2^k * exp(f) */
|
||||
/* now need to work out exp(f) */
|
||||
return 0;
|
||||
|
||||
return exp(x);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1092,8 +1092,9 @@ cc_result Process_StartOpen(const cc_string* args) {
|
||||
cc_uintptr res;
|
||||
Platform_EncodeUtf16(str, args);
|
||||
|
||||
res = ShellExecuteW(NULL, NULL, str, NULL, NULL, SW_SHOWNORMAL);
|
||||
/* MSDN: "If the function succeeds, it returns a value greater than 32. If the function fails, it returns an error value that indicates the cause of the failure" */
|
||||
res = (cc_uintptr)ShellExecuteW(NULL, NULL, str, NULL, NULL, SW_SHOWNORMAL);
|
||||
/* MSDN: "If the function succeeds, it returns a value greater than 32. If the function fails, */
|
||||
/* it returns an error value that indicates the cause of the failure" */
|
||||
return res > 32 ? 0 : (cc_result)res;
|
||||
}
|
||||
#elif defined CC_BUILD_WEB
|
||||
|
Loading…
x
Reference in New Issue
Block a user