Skip to content

Commit 2ee6687

Browse files
committed
3d: simplify array to buffer for older compilers
1 parent 264e25f commit 2ee6687

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/Gpu/ArrayToBuffer.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ struct ArrayToBuffer
3232
UInt8,
3333
};
3434

35+
using input_value_type = float;
36+
3537
struct
3638
{
37-
halp::val_port<"Input", std::vector<float>> main;
39+
halp::val_port<"Input", std::vector<input_value_type>> main;
3840
halp::enum_t<Type, "Type"> type;
3941
} inputs;
4042

@@ -46,7 +48,7 @@ struct ArrayToBuffer
4648
template <typename T>
4749
void process()
4850
{
49-
if constexpr(std::is_same_v<T, decltype(inputs.main.value)::value_type>)
51+
if constexpr(std::is_same_v<T, input_value_type>)
5052
{
5153
// Direct reuse of the buffer
5254
outputs.main.buffer.raw_data = (unsigned char*)inputs.main.value.data();

0 commit comments

Comments
 (0)