From 4bfcc0e9c7ff22641d3e23c4a4433c4e03154444 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 6 Jan 2020 13:17:55 -0500 Subject: [PATCH] Fix error with clang tidy --- include/CLI/Config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/CLI/Config.hpp b/include/CLI/Config.hpp index ed17e7eb..f9a3e058 100644 --- a/include/CLI/Config.hpp +++ b/include/CLI/Config.hpp @@ -112,7 +112,7 @@ inline void checkParentSegments(std::vector &output, const std::stri std::string estring; auto parents = detail::generate_parents(currentSection, estring); - if(output.size() > 0 && output.back().name == "--") { + if(!output.empty() && output.back().name == "--") { std::size_t msize = (parents.size() > 1U) ? parents.size() : 2; while(output.back().parents.size() >= msize) { output.push_back(output.back()); @@ -279,7 +279,7 @@ ConfigBase::to_config(const App *app, bool default_also, bool write_description, // Only process option with a long-name and configurable if(!opt->get_lnames().empty() && opt->get_configurable()) { if(opt->get_group() != group) { - if(!(group == "Options" && opt->get_group() == "")) { + if(!(group == "Options" && opt->get_group().empty())) { continue; } }