mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-15 09:55:39 +02:00
Fix unreachable code warning from MSVC
When building Catch-based projects with aggressive MSVC warning levels (eg, with /Wall /W4 /WX flags), then Catch can give a warning here.
This commit is contained in:
9
include/external/clara.h
vendored
9
include/external/clara.h
vendored
@@ -373,8 +373,13 @@ namespace Clara {
|
||||
}
|
||||
virtual void setFlag( C& obj ) const {
|
||||
typename RemoveConstRef<T>::type value;
|
||||
convertInto( true, value );
|
||||
function( obj, value );
|
||||
try {
|
||||
convertInto(true, value);
|
||||
}
|
||||
catch (std::runtime_error&) {
|
||||
return;
|
||||
}
|
||||
function(obj, value);
|
||||
}
|
||||
virtual bool takesArg() const { return !IsBool<T>::value; }
|
||||
virtual IArgFunction<C>* clone() const { return new BoundBinaryFunction( *this ); }
|
||||
|
Reference in New Issue
Block a user