summaryrefslogtreecommitdiff
path: root/src/passes/hash-stringify-walker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/hash-stringify-walker.cpp')
-rw-r--r--src/passes/hash-stringify-walker.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/passes/hash-stringify-walker.cpp b/src/passes/hash-stringify-walker.cpp
index 5afd50ef4..c9173c6a5 100644
--- a/src/passes/hash-stringify-walker.cpp
+++ b/src/passes/hash-stringify-walker.cpp
@@ -86,11 +86,9 @@ std::vector<SuffixTree::RepeatedSubstring>
StringifyProcessor::repeatSubstrings(std::vector<uint32_t>& hashString) {
SuffixTree st(hashString);
std::vector<SuffixTree::RepeatedSubstring> substrings(st.begin(), st.end());
- for (auto substring : substrings) {
+ for (auto& substring : substrings) {
// Sort by increasing start index to ensure determinism.
- std::sort(substring.StartIndices.begin(),
- substring.StartIndices.end(),
- [](uint32_t a, uint32_t b) { return a < b; });
+ std::sort(substring.StartIndices.begin(), substring.StartIndices.end());
}
// Substrings are sorted so that the longest substring that repeats the most
// times is ordered first. This is done so that we can assume the most