mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-05 22:53:52 +00:00
fix: static analysis problems (#785)
* fix: static analysis problems * fix to warrnings reported by Klocwork in CLI11 v2.2.0 * style: pre-commit.ci fixes * Update include/CLI/FormatterFwd.hpp Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> * Update include/CLI/FormatterFwd.hpp Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
parent
a66ae41457
commit
9a6c6f6b50
@ -57,6 +57,8 @@ class FormatterBase {
|
|||||||
FormatterBase() = default;
|
FormatterBase() = default;
|
||||||
FormatterBase(const FormatterBase &) = default;
|
FormatterBase(const FormatterBase &) = default;
|
||||||
FormatterBase(FormatterBase &&) = default;
|
FormatterBase(FormatterBase &&) = default;
|
||||||
|
FormatterBase &operator=(const FormatterBase &) = default;
|
||||||
|
FormatterBase &operator=(FormatterBase &&) = default;
|
||||||
|
|
||||||
/// Adding a destructor in this form to work around bug in GCC 4.7
|
/// Adding a destructor in this form to work around bug in GCC 4.7
|
||||||
virtual ~FormatterBase() noexcept {} // NOLINT(modernize-use-equals-default)
|
virtual ~FormatterBase() noexcept {} // NOLINT(modernize-use-equals-default)
|
||||||
@ -118,6 +120,8 @@ class Formatter : public FormatterBase {
|
|||||||
Formatter() = default;
|
Formatter() = default;
|
||||||
Formatter(const Formatter &) = default;
|
Formatter(const Formatter &) = default;
|
||||||
Formatter(Formatter &&) = default;
|
Formatter(Formatter &&) = default;
|
||||||
|
Formatter &operator=(const Formatter &) = default;
|
||||||
|
Formatter &operator=(Formatter &&) = default;
|
||||||
|
|
||||||
/// @name Overridables
|
/// @name Overridables
|
||||||
///@{
|
///@{
|
||||||
|
@ -750,7 +750,7 @@ class AsNumberWithUnit : public Validator {
|
|||||||
|
|
||||||
// transform function
|
// transform function
|
||||||
func_ = [mapping, opts](std::string &input) -> std::string {
|
func_ = [mapping, opts](std::string &input) -> std::string {
|
||||||
Number num;
|
Number num{};
|
||||||
|
|
||||||
detail::rtrim(input);
|
detail::rtrim(input);
|
||||||
if(input.empty()) {
|
if(input.empty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user