Fixed clang-tidy issues

See https://github.com/p-ranav/argparse/pull/259#pullrequestreview-1284243420
This commit is contained in:
Fanurs 2023-04-22 02:35:46 -04:00
parent 3d7596765b
commit aa996952bb

View File

@ -685,11 +685,11 @@ public:
} }
prev += pos - prev + 1; prev += pos - prev + 1;
} }
if (first_line) if (first_line) {
stream << "\t" << argument.m_help; stream << "\t" << argument.m_help;
else { } else {
auto leftover = argument.m_help.substr(prev, argument.m_help.size() - prev); auto leftover = argument.m_help.substr(prev, argument.m_help.size() - prev);
if (leftover.size() > 0) { if (!leftover.empty()) {
stream.width(stream_width); stream.width(stream_width);
stream << std::string(spacing, ' ') << "\t" << leftover; stream << std::string(spacing, ' ') << "\t" << leftover;
} }