Skip to content

Commit

Permalink
[ossia] Fix a function possibly returning without a value
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Sep 12, 2024
1 parent a6b6d05 commit bf665f6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions include/avnd/binding/ossia/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,12 @@ struct controls_mirror
template <typename T>
struct controls_input_queue
{
using i_tuple = std::tuple<>;
};
template <typename T>
struct controls_output_queue
{
using o_tuple = std::tuple<>;
};
template <typename T>
requires(avnd::control_input_introspection<T>::size > 0)
Expand Down Expand Up @@ -821,24 +823,26 @@ class safe_node_base : public safe_node_base_base<T>

void process_smooth() { this->smooth.smooth_all(this->impl); }

auto make_controls_in_tuple()
typename controls_input_queue<T>::i_tuple make_controls_in_tuple()
{
// We only care about the inputs of the first one, since they're all the same
for(auto& state : this->impl.full_state())
{
return avnd::control_input_introspection<T>::filter_tuple(
state.inputs, [](auto& field) { return field.value; });
}
return {};
}

auto make_controls_out_tuple()
typename controls_output_queue<T>::o_tuple make_controls_out_tuple()
{
// Note that this does not yet make a lot of sens for polyphonic effects
for(auto& state : this->impl.full_state())
{
return avnd::control_output_introspection<T>::filter_tuple(
state.outputs, [](auto& field) { return field.value; });
}
return {};
}

void finish_run()
Expand Down

0 comments on commit bf665f6

Please sign in to comment.