From 6a8b1318ec485b188cc84d3aa93ed767848256c2 Mon Sep 17 00:00:00 2001 From: Sean Robinson Date: Mon, 7 Feb 2022 14:27:06 -0700 Subject: [PATCH] Enable clang-tidy readability-container-size-empty check Signed-off-by: Sean Robinson --- .clang-tidy | 1 - include/argparse/argparse.hpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index e156a4a..f48b448 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,7 +1,6 @@ Checks: -*, readability-*, - -readability-container-size-empty, -readability-else-after-return, -readability-implicit-bool-conversion, -readability-function-cognitive-complexity, diff --git a/include/argparse/argparse.hpp b/include/argparse/argparse.hpp index 2c31cd9..f5bb232 100644 --- a/include/argparse/argparse.hpp +++ b/include/argparse/argparse.hpp @@ -525,7 +525,7 @@ public: stream << mNames[0] << ": required."; throw std::runtime_error(stream.str()); } - if (mIsUsed && mIsRequired && mValues.size() == 0) { + if (mIsUsed && mIsRequired && mValues.empty()) { std::stringstream stream; stream << mUsedName << ": no value provided."; throw std::runtime_error(stream.str());