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.
// 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>
#if defined(_DEBUG)

View file

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

View file

@ -236,7 +236,7 @@ void *AllocateMemoryPages(size_t size, uint32_t memProtFlags) {
void *AllocateAlignedMemory(size_t size, size_t alignment) {
#ifdef _WIN32
void* ptr = _aligned_malloc(size,alignment);
void* ptr = _aligned_malloc(size, alignment);
#else
void* ptr = NULL;
#ifdef __ANDROID__

View file

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