- got rid of clearbuf.
This was used in only 4 places, 3 of which could easily be replaced with a memset, and the fourth, in the Strife status bar, suffering from a pointless performance optimization, rendering the code unreadable - the code spent here per frame is utterly insignificant so clarity should win here.
This commit is contained in:
parent
f3389ff5b7
commit
12a99c3f3c
6 changed files with 6 additions and 41 deletions
|
|
@ -268,7 +268,7 @@ void R_InitSpriteDefs ()
|
|||
// Create a hash table to speed up the process
|
||||
smax = TexMan.NumTextures();
|
||||
hashes = new Hasher[smax];
|
||||
clearbuf(hashes, sizeof(Hasher)*smax/4, -1);
|
||||
memset(hashes, -1, sizeof(Hasher)*smax);
|
||||
for (i = 0; i < smax; ++i)
|
||||
{
|
||||
FTexture *tex = TexMan.ByIndex(i);
|
||||
|
|
@ -283,7 +283,7 @@ void R_InitSpriteDefs ()
|
|||
// Repeat, for voxels
|
||||
vmax = Wads.GetNumLumps();
|
||||
vhashes = new VHasher[vmax];
|
||||
clearbuf(vhashes, sizeof(VHasher)*vmax/4, -1);
|
||||
memset(vhashes, -1, sizeof(VHasher)*vmax);
|
||||
for (i = 0; i < vmax; ++i)
|
||||
{
|
||||
if (Wads.GetLumpNamespace(i) == ns_voxels)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue