spec: avoid parenthetical ambiguities when type casting

This commit is contained in:
Danny Robson 2019-04-21 09:08:54 +10:00
parent 411f85f899
commit c1b3671f85

View File

@ -923,15 +923,15 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry):
auto wrapped = std::make_unique<indirect<VkPhysicalDevice,cruft::vk::load::instance_table>> ();
wrapped->handle = res[i];
//#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(&NAME)> (cruft::vk::load::v_table->vk_icdGetPhysicalDeviceProcAddr (entry->handle, #NAME));
//#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(NAME)*> (cruft::vk::load::v_table->vk_icdGetPhysicalDeviceProcAddr (entry->handle, #NAME));
//MAP_INSTANCE_COMMANDS(GET)
//#undef GET
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(&NAME)> (cruft::vk::load::v_table->vk_icdGetInstanceProcAddr (entry->handle, #NAME));
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(NAME)*> (cruft::vk::load::v_table->vk_icdGetInstanceProcAddr (entry->handle, #NAME));
MAP_INSTANCE_COMMANDS(GET)
#undef GET
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(&NAME)> (entry->table.vkGetInstanceProcAddr (entry->handle, #NAME));
#define GET(NAME) wrapped->table.NAME = wrapped->table.NAME ?: reinterpret_cast<decltype(NAME)*> (entry->table.vkGetInstanceProcAddr (entry->handle, #NAME));
MAP_INSTANCE_COMMANDS(GET)
#undef GET