Skip to content

Commit

Permalink
Missing preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
abique committed Sep 17, 2024
1 parent dfba762 commit 6c7d6cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/plugs/undo-test/undo-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace clap {
auto undoDelta = static_cast<const UndoDelta *>(delta);

char buffer[128];
snprintf(buffer, sizeof (buffer), "UNDO undo %d -> %d", _state, undoDelta->old_value);
snprintf(buffer, sizeof(buffer), "UNDO undo %d -> %d", _state, undoDelta->old_value);
_host.log(CLAP_LOG_INFO, buffer);

_state = undoDelta->old_value;
Expand All @@ -90,7 +90,7 @@ namespace clap {
auto undoDelta = static_cast<const UndoDelta *>(delta);

char buffer[128];
snprintf(buffer, sizeof (buffer), "UNDO redo %d -> %d", _state, undoDelta->new_value);
snprintf(buffer, sizeof(buffer), "UNDO redo %d -> %d", _state, undoDelta->new_value);
_host.log(CLAP_LOG_INFO, buffer);

_state = undoDelta->new_value;
Expand All @@ -106,7 +106,7 @@ namespace clap {
delta.new_value = ++_state;

char buffer[128];
snprintf(buffer, sizeof (buffer), "UNDO increment %d -> %d", delta.old_value, delta.new_value);
snprintf(buffer, sizeof(buffer), "UNDO increment %d -> %d", delta.old_value, delta.new_value);
_host.log(CLAP_LOG_INFO, buffer);

_host.undoChangeMade(buffer, &delta, sizeof(delta), true);
Expand All @@ -122,6 +122,7 @@ namespace clap {
return true;
}

#ifndef CLAP_PLUGINS_HEADLESS
void UndoTest::onGuiInvoke(
const std::string &method,
const std::vector<std::variant<bool, int64_t, double, std::string>> &args) {
Expand All @@ -130,4 +131,5 @@ namespace clap {
else
super::onGuiInvoke(method, args);
}
#endif
} // namespace clap

0 comments on commit 6c7d6cc

Please sign in to comment.