debug_report: Make pUserData always a const
authorCourtney Goeltzenleuchter <courtneygo@google.com>
Mon, 30 Nov 2015 18:52:06 +0000 (11:52 -0700)
committerJon Ashburn <jon@lunarg.com>
Tue, 15 Dec 2015 16:17:29 +0000 (09:17 -0700)
This prevents compiler warnings.

demos/cube.c
include/vulkan/vk_lunarg_debug_report.h
layers/vk_layer_logging.h

index b85ef55dea77295d247369d34caf166161e1c1aa..a8ef843372e2465d7ad4f81bb0648fe15b667a5a 100644 (file)
@@ -263,7 +263,7 @@ VkBool32 dbgFunc(
     int32_t                             msgCode,
     const char*                         pLayerPrefix,
     const char*                         pMsg,
-    void*                               pUserData)
+    const void*                         pUserData)
 {
     char *message = (char *) malloc(strlen(pMsg)+100);
 
index 50ee9ea81400051dd2ac3511d48fe0bf3512f39b..7dce07e9e6f0a3b9f45861653787788b3ea82fd9 100644 (file)
@@ -122,7 +122,7 @@ typedef VkBool32 (*PFN_vkDbgMsgCallback)(
     int32_t                             msgCode,
     const char*                         pLayerPrefix,
     const char*                         pMsg,
-    void*                               pUserData);
+    const void*                         pUserData);
 
 // ------------------------------------------------------------------------------------------------
 // API functions
index 5f9fe51e25d8cb1c2db674719439d7c2fca4302f..8a38d421aca3a0fec0ae257f7c98ed228393cc9a 100644 (file)
@@ -300,7 +300,7 @@ static inline VKAPI_ATTR VkBool32 VKAPI_CALL log_callback(
     int32_t                             msgCode,
     const char*                         pLayerPrefix,
     const char*                         pMsg,
-    void*                               pUserData)
+    const void*                         pUserData)
 {
     char msg_flags[30];
 
@@ -321,7 +321,7 @@ static inline VKAPI_ATTR VkBool32 VKAPI_CALL win32_debug_output_msg(
     int32_t                             msgCode,
     const char*                         pLayerPrefix,
     const char*                         pMsg,
-    void*                               pUserData)
+    const void*                         pUserData)
 {
 #ifdef WIN32
     char msg_flags[30];