Commit 75e75aae authored by Robert McGibbon's avatar Robert McGibbon
Browse files

loadPlugins in order

parent b2e7d94e
......@@ -45,6 +45,7 @@
#include <cstdlib>
#endif
#include <set>
#include <algorithm>
#include "ReferencePlatform.h"
......@@ -53,6 +54,10 @@ using namespace std;
std::vector<std::string> Platform::loadFailures;
static bool stringLengthComparator(string i, string j) {
return (i.size() < j.size());
}
static int registerPlatforms() {
......@@ -269,6 +274,7 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
vector<void*> plugins;
#endif
vector<string> loadedLibraries;
std::sort (files.begin(), files.end(), stringLengthComparator);
loadFailures.resize(0);
for (unsigned int i = 0; i < files.size(); ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment