tools/spec: prefer pointer to decltype over decltype pointer
This commit is contained in:
parent
baf94e5e9d
commit
fa6a5e103d
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user