Fix GCC5 build.

This commit is contained in:
Hans-Kristian Arntzen 2023-01-05 12:24:02 +01:00
parent cc2b3b61a6
commit 549cde7fae
2 changed files with 3 additions and 3 deletions

View File

@ -226,7 +226,7 @@ public:
}
template <typename U, size_t M>
SmallVector(const U (&init)[M]) SPIRV_CROSS_NOEXCEPT : SmallVector(init, init + M)
explicit SmallVector(const U (&init)[M]) SPIRV_CROSS_NOEXCEPT : SmallVector(init, init + M)
{
}

View File

@ -4965,9 +4965,9 @@ SmallVector<ConstantID> CompilerGLSL::get_composite_constant_ids(ConstantID cons
if (is_array(type) || type.basetype == SPIRType::Struct)
return constant->subconstants;
if (is_matrix(type))
return constant->m.id;
return SmallVector<ConstantID>(constant->m.id);
if (is_vector(type))
return constant->m.c[0].id;
return SmallVector<ConstantID>(constant->m.c[0].id);
SPIRV_CROSS_THROW("Unexpected scalar constant!");
}
if (!const_composite_insert_ids.count(const_id))