Removed instances vector

This commit is contained in:
Bob Polis 2022-11-03 21:32:02 +01:00
parent 85b5507882
commit 428bf0646e

View File

@ -31,9 +31,6 @@ namespace sc {
}
}
}
for (const auto& elem : plugins) {
objects.emplace_back(elem.second());
}
throw_if_min1(closedir(plugins_dir));
}
@ -59,7 +56,6 @@ namespace sc {
static size_t count() { return plugins.size(); }
static const std::map<std::string, plugin<T>>& all() { return plugins; }
static const std::vector<T>& instances() { return objects; }
plugin(const std::string& path) : _path {path} {
_plugin = dlopen(path.c_str(), RTLD_LAZY);
@ -116,7 +112,6 @@ namespace sc {
private:
static std::map<std::string, plugin<T>> plugins;
static std::vector<T> objects;
std::string _path;
std::string _name;
@ -127,9 +122,6 @@ namespace sc {
template <typename T>
std::map<std::string, plugin<T>> plugin<T>::plugins;
template <typename T>
std::vector<T> objects;
}
#endif // _plugin_H_