diff --git a/base/VulkanDevice.cpp b/base/VulkanDevice.cpp index b508a099..b4c4042a 100644 --- a/base/VulkanDevice.cpp +++ b/base/VulkanDevice.cpp @@ -3,7 +3,7 @@ * * Encapsulates a physical Vulkan device and its logical representation * - * Copyright (C) 2016-2023 by Sascha Willems - www.saschawillems.de + * Copyright (C) 2016-2024 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ @@ -49,7 +49,7 @@ namespace vks std::vector extensions(extCount); if (vkEnumerateDeviceExtensionProperties(physicalDevice, nullptr, &extCount, &extensions.front()) == VK_SUCCESS) { - for (auto ext : extensions) + for (auto& ext : extensions) { supportedExtensions.push_back(ext.extensionName); } diff --git a/base/VulkanUIOverlay.cpp b/base/VulkanUIOverlay.cpp index 63eb055a..c6730919 100644 --- a/base/VulkanUIOverlay.cpp +++ b/base/VulkanUIOverlay.cpp @@ -2,7 +2,7 @@ /* * UI overlay class using ImGui * -* Copyright (C) 2017 by Sascha Willems - www.saschawillems.de +* Copyright (C) 2017-2024 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ diff --git a/base/VulkanUIOverlay.h b/base/VulkanUIOverlay.h index 94dc3022..3371e799 100644 --- a/base/VulkanUIOverlay.h +++ b/base/VulkanUIOverlay.h @@ -1,7 +1,7 @@ /* * UI overlay class using ImGui * -* Copyright (C) 2017 by Sascha Willems - www.saschawillems.de +* Copyright (C) 2017-2024 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ @@ -28,43 +28,43 @@ #include "VulkanAndroid.h" #endif -namespace vks +namespace vks { - class UIOverlay + class UIOverlay { public: - vks::VulkanDevice *device; - VkQueue queue; + vks::VulkanDevice* device{ nullptr }; + VkQueue queue{ VK_NULL_HANDLE }; - VkSampleCountFlagBits rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; - uint32_t subpass = 0; + VkSampleCountFlagBits rasterizationSamples{ VK_SAMPLE_COUNT_1_BIT }; + uint32_t subpass{ 0 }; vks::Buffer vertexBuffer; vks::Buffer indexBuffer; - int32_t vertexCount = 0; - int32_t indexCount = 0; + int32_t vertexCount{ 0 }; + int32_t indexCount{ 0 }; std::vector shaders; - VkDescriptorPool descriptorPool; - VkDescriptorSetLayout descriptorSetLayout; - VkDescriptorSet descriptorSet; - VkPipelineLayout pipelineLayout; - VkPipeline pipeline; + VkDescriptorPool descriptorPool{ VK_NULL_HANDLE }; + VkDescriptorSetLayout descriptorSetLayout{ VK_NULL_HANDLE }; + VkDescriptorSet descriptorSet{ VK_NULL_HANDLE }; + VkPipelineLayout pipelineLayout{ VK_NULL_HANDLE }; + VkPipeline pipeline{ VK_NULL_HANDLE }; - VkDeviceMemory fontMemory = VK_NULL_HANDLE; - VkImage fontImage = VK_NULL_HANDLE; - VkImageView fontView = VK_NULL_HANDLE; - VkSampler sampler; + VkDeviceMemory fontMemory{ VK_NULL_HANDLE }; + VkImage fontImage{ VK_NULL_HANDLE }; + VkImageView fontView{ VK_NULL_HANDLE }; + VkSampler sampler{ VK_NULL_HANDLE }; struct PushConstBlock { glm::vec2 scale; glm::vec2 translate; } pushConstBlock; - bool visible = true; - bool updated = false; - float scale = 1.0f; + bool visible{ true }; + bool updated{ false }; + float scale{ 1.0f }; UIOverlay(); ~UIOverlay();