1
0
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:
Henry Fredrick Schreiner 2017-05-31 11:07:06 -04:00
parent 1ee22ec9ff
commit 0ff1f27374
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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;
}
}