Removed instances vector
This commit is contained in:
parent
85b5507882
commit
428bf0646e
@ -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_
|
||||
|
Loading…
x
Reference in New Issue
Block a user