fixed all clang-tidy and clazy warnings

This commit is contained in:
silverqx
2022-04-21 22:17:49 +02:00
parent 17c4c8b8d1
commit 97e9059ea4
17 changed files with 44 additions and 41 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ namespace Concerns
using StatusRow = std::vector<std::string>;
/*! Get result of the status command (used in auto tests). */
static std::vector<StatusRow> status() noexcept;
static std::vector<StatusRow> status();
/*! Enable logic for unit testing? */
static void enableInUnitTests() noexcept;
#endif
+6 -5
View File
@@ -89,12 +89,15 @@ namespace Tom::Commands
/*! Get a full command-line boolean option if it's set in the parser. */
QString boolCmd(const QString &name, const QString &key = "") const;
/*! Alias for the QList command-line option size type. */
using ArgumentsSizeType = QStringList::size_type;
/*! Check whether a positional argument at the given index was set. */
bool hasArgument(QList<QString>::size_type index) const;
bool hasArgument(ArgumentsSizeType index) const;
/*! Get a list of positional arguments. */
QStringList arguments() const;
/*! Get a positional argument at the given index position. */
QString argument(QList<QString>::size_type index) const;
QString argument(ArgumentsSizeType index) const;
/*! Get a positional argument by the given name. */
QString argument(const QString &name) const;
@@ -111,10 +114,8 @@ namespace Tom::Commands
/*! Passed command's arguments. */
QStringList m_arguments {};
/*! Alias for the QList command-line option size type. */
using OptionsSizeType = QList<QCommandLineOption>::size_type;
/*! Map positional argument names to the index for obtaining values. */
std::unordered_map<QString, OptionsSizeType> m_positionalArguments {};
std::unordered_map<QString, ArgumentsSizeType> m_positionalArguments {};
private:
/*! Initialize positional arguments map. */
+1
View File
@@ -8,6 +8,7 @@ TINY_SYSTEM_HEADER
#include <QString>
#include <iostream>
#include <unordered_map>
#include <orm/macros/commonnamespace.hpp>