Skip to content

Commit 8fbff61

Browse files
committed
Additional opt
1 parent 8a0ae72 commit 8fbff61

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/w3d/renderer/textureloader.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@ void TextureLoader::Request_Thumbnail(TextureBaseClass *texture)
298298
// Possibly this code isn't ever actually used with Thumbnail code in general being minimally
299299
// called.
300300
if (texture->Get_Thumbnail_Load_Task() != nullptr) {
301-
FastCriticalSectionClass::LockClass lock(g_foregroundCritSec);
302-
g_foregroundQueue.Remove(texture->Get_Thumbnail_Load_Task());
301+
{
302+
FastCriticalSectionClass::LockClass lock(g_foregroundCritSec);
303+
g_foregroundQueue.Remove(texture->Get_Thumbnail_Load_Task());
304+
}
303305
texture->Get_Thumbnail_Load_Task()->Destroy();
304306
}
305307
} else {
@@ -496,7 +498,8 @@ void TextureLoader::Process_Foreground_Thumbnail(TextureLoadTaskClass *task)
496498
switch (task->Get_Load_State()) {
497499
case TextureLoadTaskClass::STATE_NONE:
498500
Load_Thumbnail(task->Get_Texture());
499-
case TextureLoadTaskClass::STATE_FOREGROUND_OVERRIDE: // Fallthrough
501+
[[fallthrough]];
502+
case TextureLoadTaskClass::STATE_FOREGROUND_OVERRIDE:
500503
task->Destroy();
501504
break;
502505
default:

0 commit comments

Comments
 (0)