Removed random_choice function

This commit is contained in:
Bob Polis 2021-10-06 10:56:58 +02:00
parent b576c1cfe6
commit 34c19f7a9a

View File

@ -62,13 +62,6 @@ namespace sc {
static size_t count() { return plugins.size(); } static size_t count() { return plugins.size(); }
static plugin& random_choice() {
static std::random_device rdev {};
static std::default_random_engine reng {rdev()};
std::uniform_int_distribution<int> dist {0, count() - 1};
return get(names()[dist(reng)]);
}
plugin(const std::string& path) : _path {path} { plugin(const std::string& path) : _path {path} {
_plugin = ::dlopen(path.c_str(), RTLD_LAZY); _plugin = ::dlopen(path.c_str(), RTLD_LAZY);