From af510bce93f84e2ff03e17cd0a1b5adbe289a269 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 2 Jan 2024 21:07:02 +0100 Subject: [PATCH] inline deez nuts --- src/dehacked.c | 2 +- src/m_fixed.c | 2 +- src/r_main.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 9d08cffa4..c6774aa1a 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -9265,7 +9265,7 @@ static int lib_dummysuper(lua_State *L) return luaL_error(L, "Can't call super() outside of hardcode-replacing A_Action functions being called by state changes!"); // convoluted, I know. @_@;; } -static inline int lib_getenum(lua_State *L) +FUNCINLINE static ATTRINLINE int lib_getenum(lua_State *L) { const char *word, *p; fixed_t i; diff --git a/src/m_fixed.c b/src/m_fixed.c index 0328fc2b2..44baefae1 100644 --- a/src/m_fixed.c +++ b/src/m_fixed.c @@ -23,7 +23,7 @@ #include "m_fixed.h" #include "tables.h" // ANGLETOFINESHIFT -fixed_t FixedSqrt(fixed_t x) +FUNCINLINE ATTRINLINE fixed_t FixedSqrt(fixed_t x) { #ifdef HAVE_SQRT const float fx = FIXED_TO_FLOAT(x); diff --git a/src/r_main.c b/src/r_main.c index d8aea7658..cf3ef1c1a 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -326,7 +326,7 @@ static void FlipCam4_OnChange(void) // killough 5/2/98: reformatted // -FUNCINLINE ATTRINLINE inline INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *restrict node) +FUNCINLINE ATTRINLINE INT32 R_PointOnSide(fixed_t x, fixed_t y, node_t *restrict node) { if (!node->dx) return x <= node->x ? node->dy > 0 : node->dy < 0; @@ -467,7 +467,7 @@ fixed_t R_PointToDist(fixed_t x, fixed_t y) return R_PointToDist2(viewx, viewy, x, y); } -inline angle_t R_PointToAngleEx(INT32 x2, INT32 y2, INT32 x1, INT32 y1) +FUNCINLINE ATTRINLINE angle_t R_PointToAngleEx(INT32 x2, INT32 y2, INT32 x1, INT32 y1) { INT64 dx = x1-x2; INT64 dy = y1-y2; @@ -659,7 +659,7 @@ static void R_InitTextureMapping(void) // #define DISTMAP 2 -static inline void R_InitLightTables(void) +FUNCINLINE static ATTRINLINE void R_InitLightTables(void) { INT32 i; INT32 j; @@ -1133,7 +1133,7 @@ void R_Init(void) // // R_PointInSubsector // -FUNCINLINE ATTRINLINE inline subsector_t *R_PointInSubsector(fixed_t x, fixed_t y) +FUNCINLINE ATTRINLINE subsector_t *R_PointInSubsector(fixed_t x, fixed_t y) { size_t nodenum = numnodes-1; @@ -1146,7 +1146,7 @@ FUNCINLINE ATTRINLINE inline subsector_t *R_PointInSubsector(fixed_t x, fixed_t // // R_IsPointInSubsector, same as above but returns 0 if not in subsector // -subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y) +FUNCINLINE ATTRINLINE subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y) { node_t *node; INT32 side, i;