diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-03 22:43:54 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-03 22:43:54 +0200 |
commit | 256b5beb89d2c67d74d80a6f1a0f0dad074911e3 (patch) | |
tree | 23326dfe10e290417f823803c75628327f727636 /sinksh/syntax_modules/sink_count.cpp | |
parent | 50bed81038f10091d35c5719df8078612393ae95 (diff) | |
download | sink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.tar.gz sink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.zip |
Removed the use of C99 extensions
Diffstat (limited to 'sinksh/syntax_modules/sink_count.cpp')
-rw-r--r-- | sinksh/syntax_modules/sink_count.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sinksh/syntax_modules/sink_count.cpp b/sinksh/syntax_modules/sink_count.cpp index 1edf1c2..f16b92b 100644 --- a/sinksh/syntax_modules/sink_count.cpp +++ b/sinksh/syntax_modules/sink_count.cpp | |||
@@ -66,12 +66,9 @@ bool count(const QStringList &args, State &state) | |||
66 | Syntax::List syntax() | 66 | Syntax::List syntax() |
67 | { | 67 | { |
68 | Syntax count("count", QObject::tr("Returns the number of items of a given type in a resource"), &SinkCount::count, Syntax::EventDriven); | 68 | Syntax count("count", QObject::tr("Returns the number of items of a given type in a resource"), &SinkCount::count, Syntax::EventDriven); |
69 | 69 | count.addPositionalArgument({"type", "The entity type to count"}); | |
70 | count.addPositionalArgument({.name = "type", .help = "The entity type to count"}); | 70 | count.addPositionalArgument({"resource", "A resource id where to count", false}); |
71 | count.addPositionalArgument({.name = "resource", .help = "A resource id where to count", .required = false}); | ||
72 | |||
73 | count.completer = &SinkshUtils::typeCompleter; | 71 | count.completer = &SinkshUtils::typeCompleter; |
74 | |||
75 | return Syntax::List() << count; | 72 | return Syntax::List() << count; |
76 | } | 73 | } |
77 | 74 | ||