Skip to content

Commit

Permalink
Move return so that switch has default case
Browse files Browse the repository at this point in the history
When a project using docopt.cpp is built with `-Werror=switch-default`
option, there's an error
```
error: switch missing default case [-Werror=switch-default]
```
which this fixes.

Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com>
  • Loading branch information
eaaltonen committed May 27, 2022
1 parent 400e6dd commit 729cbe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docopt_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ namespace docopt {
case Kind::Long: return "long";
case Kind::String: return "string";
case Kind::StringList: return "string-list";
default: return "unknown";
}
return "unknown";
}

void throwIfNotKind(Kind expected) const {
Expand Down

0 comments on commit 729cbe7

Please sign in to comment.