mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-13 13:21:31 +00:00
clang: fixup a few clang warnings
This commit is contained in:
parent
68054a49e3
commit
07fc74eaf5
5 changed files with 9 additions and 8 deletions
|
@ -80,9 +80,6 @@ endif()
|
|||
|
||||
if(${CMAKE_SYSTEM} MATCHES "Darwin")
|
||||
add_definitions(-DMACOSX)
|
||||
if(${CMAKE_C_COMPILER_ID} MATCHES "Clang")
|
||||
set(CLANG ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
|
|
@ -408,6 +408,10 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -mno-ms-bitfields)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-absolute-value)
|
||||
endif()
|
||||
|
||||
add_definitions(-DCMAKECONFIG)
|
||||
|
||||
#add_library(SRB2Core STATIC
|
||||
|
|
|
@ -49,7 +49,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
|||
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||
{
|
||||
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
||||
cmd->angleturn = abs(tails->angle - sonic->angle)>>16;
|
||||
cmd->angleturn = abs((tails->angle - sonic->angle))>>16;
|
||||
if (sonic->angle < tails->angle)
|
||||
cmd->angleturn = -cmd->angleturn;
|
||||
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
||||
|
|
|
@ -2507,8 +2507,8 @@ isblocking:
|
|||
|
||||
climbangle += (ANGLE_90 * (whichside ? -1 : 1));
|
||||
|
||||
if (((!slidemo->player->climbing && abs(slidemo->angle - ANGLE_90 - climbline) < ANGLE_45)
|
||||
|| (slidemo->player->climbing == 1 && abs(slidemo->angle - climbline) < ANGLE_135))
|
||||
if (((!slidemo->player->climbing && abs((slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45)
|
||||
|| (slidemo->player->climbing == 1 && abs((slidemo->angle - climbline)) < ANGLE_135))
|
||||
&& P_IsClimbingValid(slidemo->player, climbangle))
|
||||
{
|
||||
slidemo->angle = climbangle;
|
||||
|
|
|
@ -7902,9 +7902,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
if (player == &players[consoleplayer])
|
||||
{
|
||||
if (focusangle >= localangle)
|
||||
localangle += abs(focusangle - localangle)>>5;
|
||||
localangle += abs((focusangle - localangle))>>5;
|
||||
else
|
||||
localangle -= abs(focusangle - localangle)>>5;
|
||||
localangle -= abs((focusangle - localangle))>>5;
|
||||
}
|
||||
}
|
||||
else if (P_AnalogMove(player)) // Analog
|
||||
|
|
Loading…
Reference in a new issue