Change up strcasecmp/strncasecmp to be more C++y

This commit is contained in:
iikorni
2026-08-30 16:40:12 -05:00
parent 7a697986c6
commit da2a9a8fbc
32 changed files with 351 additions and 790 deletions
+4 -4
View File
@@ -547,7 +547,7 @@ static void Mod_LoadTextures (lump_t *l)
//johnfitz -- lots of changes
if (!isDedicated) //no texture uploading for dedicated server
{
if (!q_strncasecmp(tx->name,"sky",3)) //sky texture //also note -- was Q_strncmp, changed to match qbsp
if (std::is_eq(common::strncasecmp(tx->name,"sky",3))) //sky texture //also note -- was Q_strncmp, changed to match qbsp
{
if (loadmodel->bspversion == BSPVERSION_QUAKE64)
Sky_LoadTextureQ64 (loadmodel, tx);
@@ -1306,7 +1306,7 @@ static void Mod_LoadFaces (lump_t *l, bool bsp2)
out->samples = loadmodel->lightdata + (lofs * 3); //johnfitz -- lit support via lordhavoc (was "+ i")
//johnfitz -- this section rewritten
if (!q_strncasecmp(out->texinfo->texture->name,"sky",3)) // sky surface //also note -- was Q_strncmp, changed to match qbsp
if (std::is_eq(common::strncasecmp(out->texinfo->texture->name,"sky",3))) // sky surface //also note -- was Q_strncmp, changed to match qbsp
{
out->flags |= (SURF_DRAWSKY | SURF_DRAWTILED);
Mod_PolyForUnlitSurface (out); //no more subdivision
@@ -2129,7 +2129,7 @@ static FILE *Mod_FindVisibilityExternal(void)
fclose(f);
return NULL;
}
if (!q_strcasecmp(header.mapname, shortname))
if (std::is_eq(common::strcasecmp(header.mapname, shortname)))
break;
pos += header.filelen + VISPATCH_HEADER_LEN;
fseek(f, pos, SEEK_SET);
@@ -2231,7 +2231,7 @@ static void Mod_LoadBrushModel (qmodel_t *mod, void *buffer)
Mod_LoadFaces (&header->lumps[LUMP_FACES], bsp2);
Mod_LoadMarksurfaces (&header->lumps[LUMP_MARKSURFACES], bsp2);
if (mod->bspversion == BSPVERSION && external_vis.value && sv.modelname[0] && !q_strcasecmp(loadname, sv.name))
if (mod->bspversion == BSPVERSION && external_vis.value && sv.modelname[0] && std::is_eq(common::strcasecmp(loadname, sv.name)))
{
FILE* fvis;
console::debug("trying to open external vis file\n");