hello: avoid differing signed comparisons

This commit is contained in:
Danny Robson 2017-11-23 17:30:53 +11:00
parent 98d30a560e
commit e56b8573df

View File

@ -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;