diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-08 21:24:55 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-08 21:24:55 +0000 |
| commit | 726732244a5d51a0da54219174c13f4428017b79 (patch) | |
| tree | 6363fc0014e4513406d5db4962f4f295f255243f /src/helpers/MiscFunctions.cpp | |
| parent | be6e1a33b1d37ce3639ceb5c40fce581c77fd54a (diff) | |
sort valid ws-es in relative
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 9bd94a7c..e0dcb6dc 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -286,6 +286,8 @@ int getWorkspaceIDFromString(const std::string& in, std::string& outName) { validWSes.push_back(ws->m_iID); } + std::sort(validWSes.begin(), validWSes.end()); + // get the offset remains = remains < 0 ? -((-remains) % validWSes.size()) : remains % validWSes.size(); |
