More fastcmp cleanup

This commit is contained in:
GenericHeroGuy 2025-12-11 21:46:24 +01:00
parent 5abfb3926f
commit bcb0eb95cc
38 changed files with 9 additions and 47 deletions

View file

@ -34,7 +34,6 @@
#include "../taglist.h"
#include "../p_local.h"
#include "../deh_tables.h"
#include "../fastcmp.h"
#include "../hu_stuff.h"
#include "../s_sound.h"
#include "../r_textures.h"

View file

@ -66,7 +66,6 @@
#include "m_misc.h" // screenshot functionality
#include "deh_tables.h" // Dehacked list test
#include "m_cond.h" // condition initialization
#include "fastcmp.h"
#include "r_fps.h" // Frame interpolation/uncapped
#include "keys.h"
#include "filesrch.h" // refreshdirmenu
@ -1406,7 +1405,7 @@ D_ConvertVersionNumbers (void)
const char *D_GetFancyBranchName(void)
{
if (fastcmp(compbranch, ""))
if (compbranch[0] == '\0')
{
// \x8b = aqua highlight
return "\x8b" "detached HEAD" "\x80";

View file

@ -944,7 +944,7 @@ void Command_Drop(void)
return;
}
if (!(!fasticmp(COM_Argv(1), "reset") && !fasticmp(COM_Argv(1), "cancel") && !fasticmp(COM_Argv(1), "stop")))
if (fasticmp(COM_Argv(1), "reset") || fasticmp(COM_Argv(1), "cancel") || fasticmp(COM_Argv(1), "stop"))
{
memset(packetdropquantity, 0, sizeof(packetdropquantity));
return;
@ -964,7 +964,7 @@ void Command_Drop(void)
packetname = COM_Argv(1);
if (!(!fasticmp(packetname, "all") && !fasticmp(packetname, "any")))
if (fasticmp(packetname, "all") || fasticmp(packetname, "any"))
for (i = 0; i < NUMPACKETTYPE; i++)
packetdropquantity[i] = packetquantity;
else

View file

@ -24,7 +24,6 @@ extern "C" {
#include "m_misc.h"
#include "p_local.h"
#include "st_stuff.h"
#include "fastcmp.h"
#include "lua_script.h"
#include "lua_libs.h"
#include "k_items.h"

View file

@ -32,7 +32,6 @@
#include "r_picformats.h"
#include "r_things.h" // R_Char2Frame
#include "r_sky.h"
#include "fastcmp.h"
#include "lua_script.h" // Reluctantly included for LUA_EvalMath
#include "d_clisrv.h"
#include "v_video.h"

View file

@ -33,7 +33,6 @@
#include "r_picformats.h"
#include "r_things.h" // R_Char2Frame
#include "r_sky.h"
#include "fastcmp.h"
#include "lua_script.h" // Reluctantly included for LUA_EvalMath
#include "d_clisrv.h"
#include "k_items.h"

View file

@ -34,7 +34,6 @@
#include "k_waypoint.h" // waypoint values (for lua)
#include "deh_tables.h"
#include "fastcmp.h"
strbuf_t *statenames;
strbuf_t *mobjnames;

View file

@ -43,7 +43,6 @@
#include "p_local.h"
#include "p_setup.h"
#include "st_stuff.h" // hud hiding
#include "fastcmp.h"
#include "r_fps.h" // R_GetTimeFrac
#include "r_things.h" // numskins
#include "r_skins.h"

View file

@ -38,7 +38,6 @@
#include "p_local.h"
#include "p_setup.h"
#include "st_stuff.h" // hud hiding
#include "fastcmp.h"
#include "r_fps.h" // R_GetTimeFrac
#include "lua_hud.h"

View file

@ -5771,7 +5771,7 @@ char *G_BuildMapTitle(INT32 mapnum)
if (!mapnum || mapnum > nummapheaders || !mapheaderinfo[mapnum-1])
I_Error("G_BuildMapTitle: Internal map ID %d not found (nummapheaders = %d)", mapnum-1, nummapheaders);
if (!fastcmp(mapheaderinfo[mapnum-1]->lvlttl, ""))
if (mapheaderinfo[mapnum-1]->lvlttl[0] != '\0')
{
size_t len = 1;
const char *zonetext = NULL;

View file

@ -10,6 +10,7 @@
/// \file h_timers.cpp
/// \brief C++ port of Home's item timers
#include "doomdef.h"
#include "h_timers.h"
#include "k_hud.h"
#include "r_draw.h"
@ -30,7 +31,6 @@
#include "r_main.h"
#include "r_fps.h"
#include "s_sound.h"
#include "fastcmp.h"
#include "m_cond.h"
#include <unordered_map>
#include <vector>

View file

@ -22,7 +22,6 @@
#include "../d_main.h"
#include "../doomdef.h"
#include "../doomstat.h"
#include "../fastcmp.h"
#ifdef HWRENDER
#include "hw_drv.h"

View file

@ -15,7 +15,6 @@
#include "doomdata.h"
#include "doomdef.h"
#include "doomtype.h"
#include "fastcmp.h"
#include "r_textures.h"
#include "w_wad.h"
#include "z_zone.h"

View file

@ -20,7 +20,6 @@
#include "doomdef.h"
#include "doomstat.h"
#include "doomtype.h"
#include "fastcmp.h"
#include "m_fixed.h"
#include "m_random.h"
#include "p_local.h"

View file

@ -11,7 +11,6 @@
/// \brief basic functions for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "p_local.h"
#include "p_setup.h" // So we can have P_SetupLevelSky
#include "p_slopes.h" // P_GetSlopeZAt

View file

@ -12,8 +12,6 @@
/// \brief player botvars structure library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "lua_script.h"
#include "lua_libs.h"
#include "k_bot.h"

View file

@ -11,7 +11,6 @@
/// \brief console modifying/etc library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "p_local.h"
#include "g_game.h"
#include "byteptr.h"

View file

@ -12,7 +12,6 @@
/// \brief player follower structure library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "k_follower.h"
#include "r_skins.h"
#include "sounds.h"

View file

@ -11,7 +11,6 @@
/// \brief custom HUD rendering library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "r_defs.h"
#include "r_local.h"
#include "r_fps.h"

View file

@ -11,7 +11,6 @@
/// \brief infotable editing library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "info.h"
#include "dehacked.h"
#include "deh_tables.h"

View file

@ -12,7 +12,6 @@
/// \brief item structures library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "k_items.h"
#include "lua_script.h"

View file

@ -26,7 +26,6 @@
#include "lua_hook.h" // hook_cmd_running errors
#include "dehacked.h"
#include "fastcmp.h"
#include "doomstat.h"
enum sector_e {

View file

@ -11,7 +11,6 @@
/// \brief basic math library for Lua scripting
#include "doomdef.h"
//#include "fastcmp.h"
#include "tables.h"
#include "p_local.h"
#include "doomstat.h" // for ALLCHAOSEMERALDS

View file

@ -11,7 +11,6 @@
/// \brief mobj/thing library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "r_skins.h"
#include "p_local.h"
#include "g_game.h"

View file

@ -12,7 +12,6 @@
#include "blua/lua.h"
#include "doomdef.h"
#include "fastcmp.h"
#include "p_mobj.h"
#include "d_player.h"
#include "g_game.h"

View file

@ -11,7 +11,6 @@
/// \brief polyobject library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "p_local.h"
#include "p_polyobj.h"
#include "lua_script.h"

View file

@ -11,7 +11,6 @@
/// \brief Lua scripting basics
#include "doomdef.h"
#include "fastcmp.h"
#include "dehacked.h"
#include "deh_lua.h"
#include "z_zone.h"

View file

@ -11,7 +11,6 @@
/// \brief player skin structure library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "r_skins.h"
#include "sounds.h"

View file

@ -12,8 +12,6 @@
/// \brief terrain structure library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "lua_script.h"
#include "lua_libs.h"
#include "k_terrain.h"

View file

@ -13,7 +13,6 @@
/// \brief voice structure library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "r_skins.h"
#include "sounds.h"
#include "deh_tables.h"

View file

@ -12,8 +12,6 @@
/// \brief wapoint structure library for Lua scripting
#include "doomdef.h"
#include "fastcmp.h"
#include "lua_script.h"
#include "lua_libs.h"
#include "p_local.h"

View file

@ -38,8 +38,6 @@
#include "lua_script.h"
#include "lua_hook.h"
#include "fastcmp.h"
//
// CHEAT SEQUENCE PACKAGE
//

View file

@ -87,7 +87,6 @@
#include "m_random.h"
#include "deh_tables.h" // menunames
#include "fastcmp.h"
#if defined(HAVE_SDL)
#include <SDL.h>

View file

@ -89,7 +89,6 @@
#include "p_slopes.h"
#include "fastcmp.h" // textmap parsing
#include "taglist.h"
// SRB2Kart

View file

@ -28,7 +28,6 @@
#include "d_netfil.h"
#include "r_sky.h" // skyflatnum
#include "p_local.h" // camera info
#include "fastcmp.h"
#include "m_misc.h" // for tunes command
#include "m_cond.h" // for conditionsets
#include "lua_hook.h" // MusicChange hook

View file

@ -48,7 +48,7 @@
#endif
#define GETFUNC(func) \
else if (0 == !fastcmp(#func, funcName)) \
else if (fastcmp(#func, funcName)) \
funcPointer = FUNCPTRCAST(&func) \
//
//
@ -66,7 +66,7 @@ void *hwSym(const char *funcName,void *handle)
{
void *funcPointer = NULL;
#ifdef HWRENDER
if (0 == !fastcmp("SetTexturePalette", funcName))
if (fastcmp("SetTexturePalette", funcName))
funcPointer = FUNCPTRCAST(&OglSdlSetPalette);
GETFUNC(Init);
@ -109,7 +109,7 @@ void *hwSym(const char *funcName,void *handle)
GETFUNC(SetScreenPalette);
#else //HWRENDER
if (0 == !fastcmp("FinishUpdate", funcName))
if (fastcmp("FinishUpdate", funcName))
return funcPointer; //&FinishUpdate;
#endif //!HWRENDER
#ifdef STATIC3DS

View file

@ -2336,7 +2336,7 @@ char *I_GetUserName(void)
}
if (!fastcmp(username, ""))
if (username[0] != '\0')
return username;
return NULL; // dummy for platform independent version
}

View file

@ -44,7 +44,6 @@
#include "w_wad.h"
#include "z_zone.h"
#include "fastcmp.h"
#include "g_game.h" // G_LoadGameData
#include "filesrch.h"
@ -1699,7 +1698,6 @@ lumpnum_t W_CheckNumForNameInFolder(const char *lump, const char *folder)
}
// Used by Lua. Case sensitive lump checking, quickly...
#include "fastcmp.h"
UINT8 W_LumpExists(const char *name)
{
INT32 i, j;