mirror of
https://github.com/Yet-Another-DreamTeam/quicknote.git
synced 2026-03-13 00:07:25 +00:00
reslove sortedHelp output .-.
This commit is contained in:
parent
807d7b9ff5
commit
466d088921
@ -45,10 +45,17 @@ public:
|
||||
std::string getHelpAsString()
|
||||
{
|
||||
std::string help = "";
|
||||
for (auto &commandInfo : this->commands)
|
||||
std::list<commandInfo> sortedCommands = this->commands;
|
||||
|
||||
sortedCommands.sort([](const commandInfo &a, const commandInfo &b) {
|
||||
return a.name < b.name;
|
||||
});
|
||||
|
||||
for (auto &commandInfo : sortedCommands)
|
||||
{
|
||||
help += commandInfo.name + " - " + commandInfo.description + "\n";
|
||||
}
|
||||
|
||||
return help;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user