Skip to content

Commit

Permalink
Some additional cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
abique committed Nov 30, 2023
1 parent 518030a commit fbf3e87
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions plugins/clap-entry.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#include <clap/clap.h>

#include <cstring>
#include <exception>
#include <functional>
#include <sstream>
#include <vector>
#include <mutex>
#include <iostream>

#include "path-provider.hh"
#include "plugs/adsr/adsr-plug.hh"
#include "plugs/dc-offset/dc-offset.hh"
#include "plugs/gain/gain.hh"
Expand Down Expand Up @@ -88,9 +87,8 @@ static uint32_t clap_get_plugin_count(const clap_plugin_factory *) { return g_pl
static const clap_plugin_descriptor *clap_get_plugin_descriptor(const clap_plugin_factory *,
uint32_t index) {
if (index < 0 || index >= g_plugins.size()) {
std::ostringstream msg;
msg << "index out of bounds: " << index << " not in 0.." << g_plugins.size();
throw std::invalid_argument(msg.str());
std::cerr << "index out of bounds: " << index << " not in 0.." << g_plugins.size() << std::endl;
std::terminate();
}

return g_plugins[index].desc;
Expand Down

0 comments on commit fbf3e87

Please sign in to comment.