mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-03 14:03: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: '*,-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: '-*,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'
|
HeaderFilterRegex: '.*hpp'
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
- key: readability-braces-around-statements.ShortStatementLines
|
- key: readability-braces-around-statements.ShortStatementLines
|
||||||
|
@ -104,9 +104,9 @@ namespace detail {
|
|||||||
try{
|
try{
|
||||||
output = (T) std::stoll(input);
|
output = (T) std::stoll(input);
|
||||||
return true;
|
return true;
|
||||||
} catch (std::invalid_argument) {
|
} catch (const std::invalid_argument&) {
|
||||||
return false;
|
return false;
|
||||||
} catch (std::out_of_range) {
|
} catch (const std::out_of_range&) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,9 +117,9 @@ namespace detail {
|
|||||||
try{
|
try{
|
||||||
output = (T) std::stold(input);
|
output = (T) std::stold(input);
|
||||||
return true;
|
return true;
|
||||||
} catch (std::invalid_argument) {
|
} catch (const std::invalid_argument&) {
|
||||||
return false;
|
return false;
|
||||||
} catch (std::out_of_range) {
|
} catch (const std::out_of_range&) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user