Vulkan/Debug: Fix build with clang-10.
Fix warning treated as error that loop only iterates once.
Bug: b/148401179
Change-Id: I8caf237ede034ba6802a6fbc8167140b27cc13cb
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/44548
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/Vulkan/Debug/Server.cpp b/src/Vulkan/Debug/Server.cpp
index 267811d..667caee 100644
--- a/src/Vulkan/Debug/Server.cpp
+++ b/src/Vulkan/Debug/Server.cpp
@@ -307,13 +307,9 @@
// Workaround for
// https://github.com/microsoft/VSDebugAdapterHost/issues/11
- if(clientIsVisualStudio)
+ if(clientIsVisualStudio && !threads.empty())
{
- for(auto thread : threads)
- {
- event.threadId = thread->id.value();
- break;
- }
+ event.threadId = threads.front()->id.value();
}
}