diff --git a/spirv_cross_containers.hpp b/spirv_cross_containers.hpp index 1b32870e..50513f49 100644 --- a/spirv_cross_containers.hpp +++ b/spirv_cross_containers.hpp @@ -226,7 +226,7 @@ public: } template - 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) { } diff --git a/spirv_glsl.cpp b/spirv_glsl.cpp index 4638a7dd..19ad07e7 100644 --- a/spirv_glsl.cpp +++ b/spirv_glsl.cpp @@ -4965,9 +4965,9 @@ SmallVector 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(constant->m.id); if (is_vector(type)) - return constant->m.c[0].id; + return SmallVector(constant->m.c[0].id); SPIRV_CROSS_THROW("Unexpected scalar constant!"); } if (!const_composite_insert_ids.count(const_id))