Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
47f2af23
Commit
47f2af23
authored
Jul 06, 2015
by
peastman
Browse files
Merge pull request #997 from rmcgibbo/sort-order
Sort plugins by length of filename before loading
parents
071f2f81
b67e50d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
olla/src/Platform.cpp
olla/src/Platform.cpp
+5
-0
No files found.
olla/src/Platform.cpp
View file @
47f2af23
...
...
@@ -45,6 +45,7 @@
#include <cstdlib>
#endif
#include <set>
#include <algorithm>
#include "ReferencePlatform.h"
...
...
@@ -52,6 +53,9 @@ using namespace OpenMM;
using
namespace
std
;
std
::
vector
<
std
::
string
>
Platform
::
pluginLoadFailures
;
static
bool
stringLengthComparator
(
string
i
,
string
j
)
{
return
(
i
.
size
()
<
j
.
size
());
}
static
int
registerPlatforms
()
{
...
...
@@ -269,6 +273,7 @@ vector<string> Platform::loadPluginsFromDirectory(const string& directory) {
#endif
vector
<
string
>
loadedLibraries
;
pluginLoadFailures
.
resize
(
0
);
std
::
sort
(
files
.
begin
(),
files
.
end
(),
stringLengthComparator
);
for
(
unsigned
int
i
=
0
;
i
<
files
.
size
();
++
i
)
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment