Skip to content

Commit

Permalink
style: pre-commit.ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 5, 2024
1 parent d0a80b5 commit 8a26698
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/CLI/TypeTools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ 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(input.compare(0, 2, "0o") == 0||input.compare(0, 2, "0O") == 0) {
if(input.compare(0, 2, "0o") == 0 || input.compare(0, 2, "0O") == 0) {
val = nullptr;
errno = 0;
output_ll = std::strtoull(input.c_str() + 2, &val, 8);
Expand All @@ -914,7 +914,7 @@ bool integral_conversion(const std::string &input, T &output) noexcept {
output = static_cast<T>(output_ll);
return (val == (input.c_str() + input.size()) && static_cast<std::uint64_t>(output) == output_ll);
}
if(input.compare(0, 2, "0b") == 0||input.compare(0, 2, "0B") == 0) {
if(input.compare(0, 2, "0b") == 0 || input.compare(0, 2, "0B") == 0) {
val = nullptr;
errno = 0;
output_ll = std::strtoull(input.c_str() + 2, &val, 2);
Expand Down Expand Up @@ -955,7 +955,7 @@ 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(input.compare(0, 2, "0o") == 0 || input.compare(0, 2, "0O")==0) {
if(input.compare(0, 2, "0o") == 0 || input.compare(0, 2, "0O") == 0) {
val = nullptr;
errno = 0;
output_ll = std::strtoll(input.c_str() + 2, &val, 8);
Expand All @@ -965,7 +965,7 @@ bool integral_conversion(const std::string &input, T &output) noexcept {
output = static_cast<T>(output_ll);
return (val == (input.c_str() + input.size()) && static_cast<std::int64_t>(output) == output_ll);
}
if(input.compare(0, 2, "0b") == 0 ||input.compare(0, 2, "0B")==0) {
if(input.compare(0, 2, "0b") == 0 || input.compare(0, 2, "0B") == 0) {
val = nullptr;
errno = 0;
output_ll = std::strtoll(input.c_str() + 2, &val, 2);
Expand Down

0 comments on commit 8a26698

Please sign in to comment.