Merge pull request #115 from expipiplus1/joe-annotations

Add annotations for nullability and length
diff --git a/README.md b/README.md
index 656e753..26af239 100644
--- a/README.md
+++ b/README.md
@@ -93,7 +93,7 @@
 
 `VmaAllocation` is an object that represents memory assigned to this buffer. It can be queried for parameters like Vulkan memory handle and offset.
 
-# Binariers
+# Binaries
 
 The release comes with precompiled binary executables for "VulkanSample" application which contains test suite and "VmaReplay" tool. They are compiled using Visual Studio 2017, so they require appropriate libraries to work, including "vcruntime140.dll" and "msvcp140.dll". If their launch fails with error message telling about those files missing, please download and install [Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads), "x64" version.
 
diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h
index 7c160b7..48b5520 100644
--- a/src/vk_mem_alloc.h
+++ b/src/vk_mem_alloc.h
@@ -1932,7 +1932,11 @@
 #endif

 

 #if VMA_RECORDING_ENABLED

-    #include <windows.h>

+    #if defined(_WIN32)

+        #include <windows.h>

+    #else

+        #error VMA Recording functionality is not yet available for non-Windows platforms

+    #endif

 #endif

 

 // Define this macro to declare maximum supported Vulkan version in format AAABBBCCC,

@@ -7659,9 +7663,17 @@
 #endif

 

     void ImportVulkanFunctions(const VmaVulkanFunctions* pVulkanFunctions);

+

+#if VMA_STATIC_VULKAN_FUNCTIONS == 1

     void ImportVulkanFunctions_Static();

+#endif

+

     void ImportVulkanFunctions_Custom(const VmaVulkanFunctions* pVulkanFunctions);

+

+#if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1

     void ImportVulkanFunctions_Dynamic();

+#endif

+

     void ValidateVulkanFunctions();

 

     VkDeviceSize CalcPreferredBlockSize(uint32_t memTypeIndex);

@@ -15517,6 +15529,8 @@
 #undef VMA_COPY_IF_NOT_NULL

 }

 

+#if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1

+

 void VmaAllocator_T::ImportVulkanFunctions_Dynamic()

 {

 #define VMA_FETCH_INSTANCE_FUNC(memberName, functionPointerType, functionNameString) \

@@ -15573,6 +15587,8 @@
 #undef VMA_FETCH_INSTANCE_FUNC

 }

 

+#endif // #if VMA_DYNAMIC_VULKAN_FUNCTIONS == 1

+

 void VmaAllocator_T::ValidateVulkanFunctions()

 {

     VMA_ASSERT(m_VulkanFunctions.vkGetPhysicalDeviceProperties != VMA_NULL);