forked from Mirrorlandia_minetest/irrlicht
Use binary search in CNullDriver::removeTexture()
This commit is contained in:
parent
af20d9ff86
commit
7298b46504
@ -283,15 +283,13 @@ void CNullDriver::removeTexture(ITexture* texture)
|
||||
{
|
||||
if (!texture)
|
||||
return;
|
||||
SSurface s;
|
||||
s.Surface = texture;
|
||||
|
||||
for (u32 i=0; i<Textures.size(); ++i)
|
||||
{
|
||||
if (Textures[i].Surface == texture)
|
||||
{
|
||||
s32 index = Textures.binary_search(s);
|
||||
if (index != -1) {
|
||||
texture->drop();
|
||||
Textures.erase(i);
|
||||
return;
|
||||
}
|
||||
Textures.erase(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user