From e56b8573df6c58364b4ec26f4080b3152bea0512 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 23 Nov 2017 17:30:53 +1100 Subject: [PATCH] hello: avoid differing signed comparisons --- tools/hello.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/hello.cpp b/tools/hello.cpp index 0c6639a..3012d94 100644 --- a/tools/hello.cpp +++ b/tools/hello.cpp @@ -355,13 +355,13 @@ main (void) auto queues = pdevice.queue_families (); int graphics_queue_id = -1, present_queue_id = -1; - for (int i = 0, last = queues.size (); i != last; ++i) + for (size_t i = 0, last = queues.size (); i != last; ++i) if (queues[i].queueCount > 0 && queues[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) { graphics_queue_id = i; break; } - for (int i = 0, last = queues.size (); i != last; ++i) { + for (size_t i = 0, last = queues.size (); i != last; ++i) { if (cruft::vk::error::try_query (vkGetPhysicalDeviceSurfaceSupportKHR, pdevice.native (), i, surface)) { present_queue_id = i;