googlestadia / PorQue4K

Los arcoiris son mejores en 4K. #BlackLivesMatter
Apache License 2.0
20 stars 7 forks source link

Refactor structure initializers #4

Open robbiesri opened 4 years ago

robbiesri commented 4 years ago

Right now, we follow this pattern in the app code:

VkDeviceCreateInfo device_ci = {
  VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
};

To be more clear (and safe), we should do one of these two patterns instead.

VkDeviceCreateInfo device_ci = {
  .stype = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
};

VkDeviceCreateInfo device_ci = {};
device_ci .stype = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;