Skip to content

Commit

Permalink
Modify still (needs to) return something, otherwise we break the API.
Browse files Browse the repository at this point in the history
Which would be OK since we're still in version 0, but this makes sense anyway. (Also the other paths did still return something -- no idea how it even compiled before.)

part of CURA-10914
  • Loading branch information
rburema committed Jul 23, 2024
1 parent 931023a commit 172e9e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/plugins/slotproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SlotProxy
{
plugin.modify(value, std::forward<decltype(args)>(args)...);
}
return;
return value;
}
if constexpr (sizeof...(args) == 0)
{
Expand Down
12 changes: 2 additions & 10 deletions include/plugins/slots.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ struct default_process
};
};

struct modify_default
{
constexpr void operator()(auto&& arg, auto&&...)
{
return; // Do nothing, but add some code for clangd-format not to mess up the syntax
};
};

struct simplify_default
{
auto operator()(auto&& arg, auto&&... args)
Expand Down Expand Up @@ -226,9 +218,9 @@ struct Holder

} // namespace details

using slot_gcode_paths_modify = details::slot_gcode_paths_modify_<details::modify_default>;
using slot_gcode_paths_modify = details::slot_gcode_paths_modify_<>;
using slot_infill_generate = details::slot_infill_generate_<details::infill_generate_default>;
using slot_postprocess = details::slot_postprocess_<details::modify_default>;
using slot_postprocess = details::slot_postprocess_<>;
using slot_settings_broadcast = details::slot_settings_broadcast_<>;
using slot_simplify = details::slot_simplify_<details::simplify_default>;

Expand Down

0 comments on commit 172e9e7

Please sign in to comment.