Skip to content

Commit

Permalink
Merge pull request JACoders#884 from smcv/static-qinline
Browse files Browse the repository at this point in the history
Consistently use "static QINLINE" for inline C code
  • Loading branch information
ensiform authored Oct 28, 2016
2 parents c706b98 + e5b98fa commit ecd38e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions codemp/game/NPC_move.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ NPC_CheckCombatMove
-------------------------
*/

QINLINE qboolean NPC_CheckCombatMove( void )
static QINLINE qboolean NPC_CheckCombatMove( void )
{
//return NPCInfo->combatMove;
if ( ( NPCS.NPCInfo->goalEntity && NPCS.NPC->enemy && NPCS.NPCInfo->goalEntity == NPCS.NPC->enemy ) || ( NPCS.NPCInfo->combatMove ) )
Expand Down Expand Up @@ -143,7 +143,7 @@ NPC_GetMoveInformation
-------------------------
*/

QINLINE qboolean NPC_GetMoveInformation( vec3_t dir, float *distance )
static QINLINE qboolean NPC_GetMoveInformation( vec3_t dir, float *distance )
{
//NOTENOTE: Use path stacks!

Expand Down
2 changes: 1 addition & 1 deletion codemp/game/bg_pmove.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ qboolean BG_KnockDownable(playerState_t *ps)
}

//hacky assumption check, assume any client non-humanoid is a rocket trooper
qboolean QINLINE PM_IsRocketTrooper(void)
static QINLINE qboolean PM_IsRocketTrooper(void)
{
/*
if (pm->ps->clientNum < MAX_CLIENTS &&
Expand Down
6 changes: 1 addition & 5 deletions shared/qcommon/q_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,7 @@ along with this program; if not, see <http://www.gnu.org/licenses/>.
#define OS_STRING "kFreeBSD"
#endif

#ifdef __clang__
#define QINLINE static inline
#else
#define QINLINE inline
#endif
#define QINLINE inline

#define PATH_SEP '/'

Expand Down

0 comments on commit ecd38e2

Please sign in to comment.