From 8a3b5f27ba6bf642a010d269a8d5b19bad3d7b23 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Tue, 17 May 2016 07:58:01 -0600 Subject: [PATCH] layers: Const correctness for debug_report_data param debug_report_data pointer passed to various log functions can be const. --- layers/vk_layer_logging.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index dd80dfe..49470b1 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -43,7 +43,7 @@ template debug_report_data *get_my_data_ptr(void *data_key, std::unordered_map &data_map); // Utility function to handle reporting -static inline bool debug_report_log_msg(debug_report_data *debug_data, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, +static inline bool debug_report_log_msg(const debug_report_data *debug_data, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, uint64_t srcObject, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *pMsg) { bool bail = false; @@ -308,11 +308,11 @@ static inline int vasprintf(char **strp, char const *fmt, va_list ap) { * is only computed if a message needs to be logged */ #ifndef WIN32 -static inline bool log_msg(debug_report_data *debug_data, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, +static inline bool log_msg(const debug_report_data *debug_data, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, uint64_t srcObject, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *format, ...) __attribute__((format(printf, 8, 9))); #endif -static inline bool log_msg(debug_report_data *debug_data, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, +static inline bool log_msg(const debug_report_data *debug_data, VkFlags msgFlags, VkDebugReportObjectTypeEXT objectType, uint64_t srcObject, size_t location, int32_t msgCode, const char *pLayerPrefix, const char *format, ...) { if (!debug_data || !(debug_data->active_flags & msgFlags)) { -- 2.7.4