add default cases (#2186)

Adding default case for switch statements where the compilation
flag -Wswitch-default is present on the command line when spdlog
is included in external projects.

Signed-off-by: Ryan Sherlock <ryan.m.sherlock@gmail.com>
This commit is contained in:
Ryan Sherlock 2021-03-19 16:56:52 -07:00 committed by GitHub
parent 417e1cee9e
commit 0f85a4683a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2874,6 +2874,8 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end,
case '^':
align = align::center;
break;
default:
break;
}
if (align != align::none) {
if (p != begin) {
@ -2963,6 +2965,8 @@ FMT_CONSTEXPR_DECL FMT_INLINE const Char* parse_format_specs(
handler.on_space();
++begin;
break;
default:
break;
}
if (begin == end) return begin;