twn_textures.c: minor optimization

This commit is contained in:
veclavtalica 2025-01-15 00:11:47 +03:00
parent 3990f78a74
commit 82d4f21a4b

View File

@ -404,7 +404,7 @@ static TextureKey textures_load(TextureCache *cache, const char *path) {
shput(cache->hash, path, new_texture); shput(cache->hash, path, new_texture);
uint16_t const id = (uint16_t)shgeti(cache->hash, path); uint16_t const id = (uint16_t)shlenu(cache->hash) - 1;
/* reuse this id for every later missing texture */ /* reuse this id for every later missing texture */
if (surface == missing_texture_surface) if (surface == missing_texture_surface)