From 729cbe7a7afe991d5f7c59fea28c98523a177213 Mon Sep 17 00:00:00 2001 From: Eero Aaltonen Date: Fri, 27 May 2022 19:32:44 +0300 Subject: [PATCH] Move return so that switch has default case 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 --- docopt_value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docopt_value.h b/docopt_value.h index e1c87e6..2666af3 100644 --- a/docopt_value.h +++ b/docopt_value.h @@ -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 {