Minor cleanups

This commit is contained in:
Henrik Rydgård 2022-04-23 22:52:28 +02:00
parent ed7dfdc8ad
commit 73452b4743
4 changed files with 5 additions and 4 deletions

View file

@ -3,6 +3,8 @@
// Utility file for using the MS CRT's memory tracking. // Utility file for using the MS CRT's memory tracking.
// crtdbg.h overloads malloc with malloc_dbg etc, but does not catch new. So here we go. // crtdbg.h overloads malloc with malloc_dbg etc, but does not catch new. So here we go.
// To add a full check of memory overruns, throw in a _CrtCheckMemory(). Useful to narrow things down.
#include <crtdbg.h> #include <crtdbg.h>
#if defined(_DEBUG) #if defined(_DEBUG)

View file

@ -60,7 +60,7 @@ private:
VulkanContext *vulkan_; VulkanContext *vulkan_;
VkImage image_ = VK_NULL_HANDLE; VkImage image_ = VK_NULL_HANDLE;
VkImageView view_ = VK_NULL_HANDLE; VkImageView view_ = VK_NULL_HANDLE;
VmaAllocation allocation_; VmaAllocation allocation_ = VK_NULL_HANDLE;
int32_t width_ = 0; int32_t width_ = 0;
int32_t height_ = 0; int32_t height_ = 0;

View file

@ -549,8 +549,7 @@ public:
} }
} }
png_image png; png_image png{};
memset(&png, 0, sizeof(png));
png.version = PNG_IMAGE_VERSION; png.version = PNG_IMAGE_VERSION;
png.format = PNG_FORMAT_RGBA; png.format = PNG_FORMAT_RGBA;
png.width = w; png.width = w;