Skip to content

Commit 78cf5f8

Browse files
author
rhorenov
committed
Fixs warning in msvc2015.
Fixed: warning C4800: 'const docopt::Option *': forcing value to bool 'true' or 'false' (performance warning) modified: docopt.cpp
1 parent d78a332 commit 78cf5f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docopt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ class Tokens {
535535
template <typename T>
536536
std::vector<T*> flat_filter(Pattern& pattern) {
537537
std::vector<Pattern*> flattened = pattern.flat([](Pattern const* p) -> bool {
538-
return dynamic_cast<T const*>(p);
538+
return dynamic_cast<T const*>(p) != nullptr;
539539
});
540540

541541
// now, we're guaranteed to have T*'s, so just use static_cast

0 commit comments

Comments
 (0)