aboutsummaryrefslogtreecommitdiffstats
path: root/src/SimpleHandlers.cpp
diff options
context:
space:
mode:
authorNiklas Halle <niklas@niklashalle.net>2020-08-26 12:31:23 +0200
committerNiklas Halle <niklas@niklashalle.net>2020-08-26 12:31:23 +0200
commite78a940d37e8ab614fd566ee840d00fbaa577c40 (patch)
treec2507e212f482ddb7fef9c946d6f20aaf7780059 /src/SimpleHandlers.cpp
parent36c2918c9980a343a50921e9f3443f39db82b7a2 (diff)
downloadn_core-e78a940d37e8ab614fd566ee840d00fbaa577c40.tar.gz
n_core-e78a940d37e8ab614fd566ee840d00fbaa577c40.zip
fix description being an extra field of command annotation
Diffstat (limited to 'src/SimpleHandlers.cpp')
-rw-r--r--src/SimpleHandlers.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/SimpleHandlers.cpp b/src/SimpleHandlers.cpp
index 40cfa68..0ebdd79 100644
--- a/src/SimpleHandlers.cpp
+++ b/src/SimpleHandlers.cpp
@@ -36,14 +36,10 @@ Handler::json Handler::helpHandler(std::string const &arguments, std::string con
for (auto const &itor : *commands) {
std::vector<json> commandAnnotations;
- commandAnnotations.emplace_back(create_annotation(Reply::AnnotationType::command));
+ commandAnnotations.emplace_back(create_annotation(Reply::AnnotationType::command, std::move(*itor.description)));
reply_vec.emplace_back(create_text("- "));
reply_vec.emplace_back(create_text(itor.command, std::move(commandAnnotations)));
- while (!itor.description->empty()) {
- reply_vec.emplace_back(std::move(itor.description->back()));
- itor.description->pop();
- }
}
reply_vec.emplace_back(create_text(