allow to customize variable i/o plugin inputs
[ardour.git] / libs / ardour / element_import_handler.cc
index 013dd3fe4489609553523e553d6d0b28a82f0457..8f6483b145b2a32b4b8dcec7ac1a0dc5b6adadba 100644 (file)
 
 */
 
-#include <ardour/element_import_handler.h>
+#include "ardour/libardour_visibility.h"
+#include "ardour/element_import_handler.h"
 
 #include <algorithm>
 
+using namespace std;
 using namespace ARDOUR;
 
 bool ElementImportHandler::_dirty = false;
@@ -36,20 +38,17 @@ ElementImportHandler::~ElementImportHandler ()
 bool
 ElementImportHandler::check_name (const string & name) const
 {
-       return std::find (names.begin(), names.end(), name) == names.end();
+       return !names.count (name);
 }
 
 void
 ElementImportHandler::add_name (string name)
 {
-       names.push_back (name);
+       names.insert (name);
 }
 
 void
 ElementImportHandler::remove_name (const string & name)
 {
-       std::list<string>::iterator it = std::find (names.begin(), names.end(), name);
-       if (it != names.end()) {
-               names.erase(it);
-       }
+       names.erase (name);
 }