Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 committed Dec 20, 2023
1 parent 0b4a36a commit ed30c9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
9 changes: 4 additions & 5 deletions include/clap-juce-extensions/clap-juce-extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const clap_plugin *clap_create_plugin(const struct clap_plugin_factory *, const
const char *);
}


/** Forward declarations for any JUCE classes we might need. */
namespace juce
{
Expand Down Expand Up @@ -284,8 +283,8 @@ struct clap_juce_audio_processor_capabilities
* The plugin should call this from within presetLoadFromLocation() to report an error when
* trying to load the preset, and then return false from presetLoadFromLocation().
*/
void reportPresetLoadError(uint32_t location_kind, const char * location, const char * load_key,
int32_t os_error, const juce::String & message)
void reportPresetLoadError(uint32_t location_kind, const char *location, const char *load_key,
int32_t os_error, const juce::String &message)
{
if (onPresetLoadError != nullptr)
onPresetLoadError(location_kind, location, load_key, os_error, message);
Expand Down Expand Up @@ -319,8 +318,8 @@ struct clap_juce_audio_processor_capabilities
std::function<void()> remoteControlsChangedSignal = nullptr;
std::function<void(uint32_t)> suggestRemoteControlsPageSignal = nullptr;
std::function<void(uint32_t location_kind, const char *location, const char *load_key,
int32_t os_error, const juce::String &msg)>
onPresetLoadError = nullptr;
int32_t os_error, const juce::String &msg)>
onPresetLoadError = nullptr;
std::function<const void *(const char *)> extensionGet = nullptr;

friend const clap_plugin *ClapAdapter::clap_create_plugin(const struct clap_plugin_factory *,
Expand Down
10 changes: 3 additions & 7 deletions src/wrapper/clap-juce-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE
}

#if CLAP_SUPPORTS_CUSTOM_FACTORY
extern const void * JUCE_CALLTYPE clapJuceExtensionCustomFactory(const char *);
extern const void *JUCE_CALLTYPE clapJuceExtensionCustomFactory(const char *);
#endif

#if !JUCE_MAC
Expand Down Expand Up @@ -230,9 +230,7 @@ class EditorContextMenu : public juce::HostProvidedContextMenu
item.text = juce::CharPointer_UTF8(entry->label);
item.isEnabled = entry->is_enabled;
item.action = [&host = this->host, target = *this->menuTarget,
id = entry->action_id] {
host.contextMenuPerform(&target, id);
};
id = entry->action_id] { host.contextMenuPerform(&target, id); };

currentMenu.addItem(item);
}
Expand All @@ -246,9 +244,7 @@ class EditorContextMenu : public juce::HostProvidedContextMenu
item.isEnabled = entry->is_enabled;
item.isTicked = entry->is_checked;
item.action = [&host = this->host, target = *this->menuTarget,
id = entry->action_id] {
host.contextMenuPerform(&target, id);
};
id = entry->action_id] { host.contextMenuPerform(&target, id); };

currentMenu.addItem(item);
}
Expand Down

0 comments on commit ed30c9e

Please sign in to comment.