Skip to content

Commit 2babd87

Browse files
Update include/CLI/TypeTools.hpp
Co-authored-by: Alexander Galanin <agalanin@nvidia.com>
1 parent c11814b commit 2babd87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/CLI/TypeTools.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,13 +964,13 @@ bool integral_conversion(const std::string &input, T &output) noexcept {
964964
// remove separators if present
965965
auto group_separators = get_group_separators();
966966
if(input.find_first_of(group_separators) != std::string::npos) {
967+
std::string nstring = input;
967968
for(auto &separator : group_separators) {
968969
if(input.find_first_of(separator) != std::string::npos) {
969-
std::string nstring = input;
970970
nstring.erase(std::remove(nstring.begin(), nstring.end(), separator), nstring.end());
971-
return integral_conversion(nstring, output);
972971
}
973972
}
973+
return integral_conversion(nstring, output);
974974
}
975975

976976
if(std::isspace(static_cast<unsigned char>(input.back()))) {

0 commit comments

Comments
 (0)