Skip to content
Snippets Groups Projects
Unverified Commit 30ad48d8 authored by John FrostFox's avatar John FrostFox :fox:
Browse files

mobjnum hashtable: don't scan the HT if 0 or nothing has been given

parent b5559002
Branches
No related tags found
No related merge requests found
...@@ -116,6 +116,9 @@ thinker_t* mobjnum_ht_linkedList_Find (uint32_t mobjnumber) ...@@ -116,6 +116,9 @@ thinker_t* mobjnum_ht_linkedList_Find (uint32_t mobjnumber)
mobjnum_linkedList* currentEntry; // = &mobjnum_Hashtable[(UINT8)(mobj->mobjnum % HT_NUMLISTS)]; mobjnum_linkedList* currentEntry; // = &mobjnum_Hashtable[(UINT8)(mobj->mobjnum % HT_NUMLISTS)];
mobjnum_linkedList* next; mobjnum_linkedList* next;
if (!mobjnumber)
return NULL;
currentEntry = &mobjnum_Hashtable[(UINT8)(mobjnumber % HT_NUMLISTS)]; currentEntry = &mobjnum_Hashtable[(UINT8)(mobjnumber % HT_NUMLISTS)];
if (!currentEntry->next) // check for the first entry if (!currentEntry->next) // check for the first entry
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment