mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-02 13:43:52 +00:00
Fix catch by value
This commit is contained in:
parent
1ee22ec9ff
commit
0ff1f27374
@ -1,6 +1,6 @@
|
||||
#Checks: '*,-clang-analyzer-alpha.*'
|
||||
#Checks: '-*,google-readability-casting,llvm-namespace-comment,performance-unnecessary-value-param,llvm-include-order,misc-throw-by-value-catch-by-reference,readability-container-size-empty,google-runtime-references,modernize*'
|
||||
Checks: '-*,llvm-namespace-comment,llvm-include-order,readability-container-size-empty'
|
||||
Checks: '-*,llvm-namespace-comment,llvm-include-order,readability-container-size-empty,misc-throw-by-value-catch-by-reference'
|
||||
HeaderFilterRegex: '.*hpp'
|
||||
CheckOptions:
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
|
@ -104,9 +104,9 @@ namespace detail {
|
||||
try{
|
||||
output = (T) std::stoll(input);
|
||||
return true;
|
||||
} catch (std::invalid_argument) {
|
||||
} catch (const std::invalid_argument&) {
|
||||
return false;
|
||||
} catch (std::out_of_range) {
|
||||
} catch (const std::out_of_range&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -117,9 +117,9 @@ namespace detail {
|
||||
try{
|
||||
output = (T) std::stold(input);
|
||||
return true;
|
||||
} catch (std::invalid_argument) {
|
||||
} catch (const std::invalid_argument&) {
|
||||
return false;
|
||||
} catch (std::out_of_range) {
|
||||
} catch (const std::out_of_range&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user