tools/spec: prefer pointer to decltype over decltype pointer

This commit is contained in:
Danny Robson 2019-03-13 18:16:49 +11:00
parent baf94e5e9d
commit fa6a5e103d

View File

@ -871,11 +871,11 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry):
if (err != VK_SUCCESS) if (err != VK_SUCCESS)
return err; return err;
#define GET(NAME) res->table.NAME = reinterpret_cast<decltype(&NAME)> (cruft::vk::load::v_table->vk_icdGetInstanceProcAddr (res->handle, #NAME)); #define GET(NAME) res->table.NAME = reinterpret_cast<decltype(NAME)*> (cruft::vk::load::v_table->vk_icdGetInstanceProcAddr (res->handle, #NAME));
MAP_INSTANCE_COMMANDS(GET) MAP_INSTANCE_COMMANDS(GET)
#undef GET #undef GET
#define GET(NAME) if (!res->table.NAME) res->table.NAME = reinterpret_cast<decltype(&NAME)> (res->table.vkGetInstanceProcAddr (res->handle, #NAME)); #define GET(NAME) if (!res->table.NAME) res->table.NAME = reinterpret_cast<decltype(NAME)*> (res->table.vkGetInstanceProcAddr (res->handle, #NAME));
MAP_INSTANCE_COMMANDS(GET) MAP_INSTANCE_COMMANDS(GET)
#undef GET #undef GET