From c25a959597671a38395f0947f96efd9d188fe77d Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Mon, 7 Feb 2022 14:29:32 -0700 Subject: [PATCH] Enable clang-tidy readability-static-accessed-through-instance check Signed-off-by: Sean Robinson --- .clang-tidy | 1 - include/argparse/argparse.hpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 419f5ee..c1dd300 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,7 +3,6 @@ Checks: readability-*, -readability-else-after-return, -readability-function-cognitive-complexity, - -readability-static-accessed-through-instance, CheckOptions: - { key: readability-identifier-naming.ClassCase, value: CamelCase } diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index ddade05..112dbb0 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -303,7 +303,7 @@ template struct parse_number { throw std::invalid_argument{ "chars_format::scientific does not parse hexfloat"}; } - if (s.find_first_of("eE") == s.npos) { + if (s.find_first_of("eE") == std::string::npos) { throw std::invalid_argument{ "chars_format::scientific requires exponent part"}; } @@ -318,7 +318,7 @@ template struct parse_number { throw std::invalid_argument{ "chars_format::fixed does not parse hexfloat"}; } - if (s.find_first_of("eE") != s.npos) { + if (s.find_first_of("eE") != std::string::npos) { throw std::invalid_argument{ "chars_format::fixed does not parse exponent part"}; }