Browse Source

Vk: interesting inconsistency with std::initializer_list.

I can't trust anything in this language. SIGH.
pull/504/head
Vladimír Vondruš 5 years ago
parent
commit
28a2cb8567
  1. 5
      src/Magnum/Vk/DescriptorPool.cpp

5
src/Magnum/Vk/DescriptorPool.cpp

@ -40,7 +40,10 @@ namespace Magnum { namespace Vk {
DescriptorPoolCreateInfo::DescriptorPoolCreateInfo(const UnsignedInt maxSets, const Containers::ArrayView<const std::pair<DescriptorType, UnsignedInt>> poolSizes, const Flags flags): _info{} {
CORRADE_ASSERT(maxSets,
"Vk::DescriptorPoolCreateInfo: there has to be at least one set", );
CORRADE_ASSERT(poolSizes,
/* On certain compilers, {} (empty initializer list) gets converted to an
arrayview that's not null, interesting. Explicitly using .empty() to
ensure the assert gets properly fired. */
CORRADE_ASSERT(!poolSizes.empty(),
"Vk::DescriptorPoolCreateInfo: there has to be at least one pool", );
Containers::ArrayView<VkDescriptorPoolSize> poolSizesCopy;

Loading…
Cancel
Save