Skip to content

Commit

Permalink
[ci] Fix build on VS22 hopefully
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Oct 21, 2024
1 parent beb38ce commit b6f124e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/Advanced/Utilities/LightnessComputer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct LightnessComputer
using clk = std::chrono::steady_clock;
clk::time_point last_ui_message = clk::now();

void init()
void prepare()
{
inputs.image.request_width = inputs.size.value.x;
inputs.image.request_height = inputs.size.value.y;
Expand Down
21 changes: 14 additions & 7 deletions include/avnd/binding/ossia/soundfiles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,14 @@ struct raw_file_storage : raw_file_input_storage<T>
{
avnd::raw_file_port auto& port = avnd::pfr::get<NField>(state.inputs);

port.file.bytes
= decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size());
port.file.filename = hdl->filename;
if(port.file.filename != hdl->filename)
{
port.file.bytes
= decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size());
port.file.filename = hdl->filename;

if_possible(port.update(state.effect));
if_possible(port.update(state.effect));
}
}
}

Expand All @@ -368,10 +371,14 @@ struct raw_file_storage : raw_file_input_storage<T>
// FIXME not generic enough.. GPU should also use effect_container
avnd::raw_file_port auto& port = avnd::pfr::get<NField>(state.inputs);

port.file.bytes = decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size());
port.file.filename = hdl->filename;
if(port.file.filename != hdl->filename)
{
port.file.bytes
= decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size());
port.file.filename = hdl->filename;

if_possible(port.update(state));
if_possible(port.update(state));
}
}
};
}
Expand Down
4 changes: 2 additions & 2 deletions include/avnd/binding/vst3/metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */

#include <base/source/fstring.h>
#include <halp/polyfill.hpp>
#include <pluginterfaces/base/funknown.h>
#include <pluginterfaces/vst/vsttypes.h>

Expand Down Expand Up @@ -121,8 +122,7 @@ static consteval UnionID controller_uuid_for_type()
UnionID component_id = component_uuid_for_type<T>();

// We just swap the values to get a new uuid...
static constexpr auto exch = [](char& a, char& b) consteval
{
static_constexpr auto exch = [](char& a, char& b) consteval {
char tmp = a;
a = b;
b = tmp;
Expand Down
6 changes: 6 additions & 0 deletions include/avnd/wrappers/controls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ static void apply_control(T& ctl, avnd::string_ish auto&& v)
}
}

template <typename T>
static void apply_control(T& ctl, const char* v)
{
return apply_control(ctl, std::string_view(v));
}

/**
* @brief Used for the case where the "host" works in a fixed [0. ; 1.] range
*/
Expand Down

0 comments on commit b6f124e

Please sign in to comment.