mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 23:24:34 +00:00
Replaced C style cast with reinterpret_cast
This commit is contained in:
parent
b183c05f45
commit
0ed5ac8435
@ -76,8 +76,8 @@ VkResult create_debug_utils_messenger (VkInstance instance,
|
|||||||
messengerCreateInfo.pfnUserCallback = debug_callback;
|
messengerCreateInfo.pfnUserCallback = debug_callback;
|
||||||
|
|
||||||
|
|
||||||
auto vkCreateDebugUtilsMessengerEXT_func = (PFN_vkCreateDebugUtilsMessengerEXT)vkGetInstanceProcAddr (
|
auto vkCreateDebugUtilsMessengerEXT_func = reinterpret_cast<PFN_vkCreateDebugUtilsMessengerEXT> (
|
||||||
instance, "vkCreateDebugUtilsMessengerEXT");
|
vkGetInstanceProcAddr (instance, "vkCreateDebugUtilsMessengerEXT"));
|
||||||
if (vkCreateDebugUtilsMessengerEXT_func != nullptr) {
|
if (vkCreateDebugUtilsMessengerEXT_func != nullptr) {
|
||||||
return vkCreateDebugUtilsMessengerEXT_func (instance, &messengerCreateInfo, nullptr, pDebugMessenger);
|
return vkCreateDebugUtilsMessengerEXT_func (instance, &messengerCreateInfo, nullptr, pDebugMessenger);
|
||||||
} else {
|
} else {
|
||||||
@ -86,8 +86,8 @@ VkResult create_debug_utils_messenger (VkInstance instance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void destroy_debug_utils_messenger (VkInstance instance, VkDebugUtilsMessengerEXT debugMessenger) {
|
void destroy_debug_utils_messenger (VkInstance instance, VkDebugUtilsMessengerEXT debugMessenger) {
|
||||||
auto vkDestroyDebugUtilsMessengerEXT_func = (PFN_vkDestroyDebugUtilsMessengerEXT)vkGetInstanceProcAddr (
|
auto vkDestroyDebugUtilsMessengerEXT_func = reinterpret_cast<PFN_vkDestroyDebugUtilsMessengerEXT> (
|
||||||
instance, "vkDestroyDebugUtilsMessengerEXT");
|
vkGetInstanceProcAddr (instance, "vkDestroyDebugUtilsMessengerEXT"));
|
||||||
if (vkDestroyDebugUtilsMessengerEXT_func != nullptr) {
|
if (vkDestroyDebugUtilsMessengerEXT_func != nullptr) {
|
||||||
vkDestroyDebugUtilsMessengerEXT_func (instance, debugMessenger, nullptr);
|
vkDestroyDebugUtilsMessengerEXT_func (instance, debugMessenger, nullptr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user