mirror of https://notabug.org/acetone/ircabot.git
sorted search
parent
bf9eb67a06
commit
8c68713f0c
2
main.cpp
2
main.cpp
|
@ -58,7 +58,7 @@ std::string search(std::string text)
|
||||||
}
|
}
|
||||||
if (matches.size() > 0)
|
if (matches.size() > 0)
|
||||||
{
|
{
|
||||||
std::reverse(matches.begin(), matches.end());
|
std::sort(matches.begin(), matches.end());
|
||||||
values += "(" + std::to_string(success) + ") ";
|
values += "(" + std::to_string(success) + ") ";
|
||||||
|
|
||||||
for (int i = matches.size()-1, count = 0; i >= 0 && count < maxSize ; --i, ++count)
|
for (int i = matches.size()-1, count = 0; i >= 0 && count < maxSize ; --i, ++count)
|
||||||
|
|
Loading…
Reference in New Issue