From de7c90c042ba6074a5e414e064eadfbc01d2e3d5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:27:23 +0000 Subject: [PATCH] style: pre-commit.ci fixes --- include/CLI/TypeTools.hpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/include/CLI/TypeTools.hpp b/include/CLI/TypeTools.hpp index e9ca33962..4b56f10c5 100644 --- a/include/CLI/TypeTools.hpp +++ b/include/CLI/TypeTools.hpp @@ -968,9 +968,8 @@ bool integral_conversion(const std::string &input, T &output) noexcept { nstring.erase(std::remove(nstring.begin(), nstring.end(), '\''), nstring.end()); return integral_conversion(nstring, output); } - if (std::isspace(static_cast(input.back()))) - { - return integral_conversion(trim_copy(input),output); + if(std::isspace(static_cast(input.back()))) { + return integral_conversion(trim_copy(input), output); } if(input.compare(0, 2, "0o") == 0 || input.compare(0, 2, "0O") == 0) { val = nullptr; @@ -1027,9 +1026,8 @@ bool integral_conversion(const std::string &input, T &output) noexcept { nstring.erase(std::remove(nstring.begin(), nstring.end(), '\''), nstring.end()); return integral_conversion(nstring, output); } - if (std::isspace(static_cast(input.back()))) - { - return integral_conversion(trim_copy(input),output); + if(std::isspace(static_cast(input.back()))) { + return integral_conversion(trim_copy(input), output); } if(input.compare(0, 2, "0o") == 0 || input.compare(0, 2, "0O") == 0) { val = nullptr; @@ -1155,14 +1153,13 @@ bool lexical_cast(const std::string &input, T &output) { if(val == (input.c_str() + input.size())) { return true; } - while (std::isspace(static_cast(*val))) - { - ++val; - if(val == (input.c_str() + input.size())) { - return true; - } + while(std::isspace(static_cast(*val))) { + ++val; + if(val == (input.c_str() + input.size())) { + return true; + } } - + // remove separators if(input.find_first_of("_'") != std::string::npos) { std::string nstring = input;