Make this use helper function

This commit is contained in:
NepDisk 2025-12-11 11:47:34 -05:00
parent 2419e25327
commit 2a763d24ba

View file

@ -1562,9 +1562,9 @@ lumpnum_t W_CheckNumForMap(const char *name, boolean checktofirst)
// Check the lumpnumcache first. Loop backwards so that we check
// most recent entries first
auto it = lumpnumcache.find(name);
if (it != lumpnumcache.end())
return it->second;
lumpnum_t cachenum = CheckLumpInCache(name);
if (cachenum != LUMPERROR)
return cachenum;
uhash = W_HashLumpName(name, strlen(name)); // Not a mistake, legacy system for short lumpnames