Commit 3aee89c8 authored by Ryan Sherlock's avatar Ryan Sherlock Committed by Ryan Sherlock

add default cases

Adding default case for cases where the compilation flag
-Wswitch-default is present on the command line when spdlog is
included in external projects.
Signed-off-by: default avatarRyan Sherlock <ryan.m.sherlock@gmail.com>
parent 44e1f9f6
...@@ -1350,6 +1350,8 @@ FMT_CONSTEXPR_DECL FMT_INLINE auto visit_format_arg( ...@@ -1350,6 +1350,8 @@ FMT_CONSTEXPR_DECL FMT_INLINE auto visit_format_arg(
return vis(arg.value_.pointer); return vis(arg.value_.pointer);
case detail::type::custom_type: case detail::type::custom_type:
return vis(typename basic_format_arg<Context>::handle(arg.value_.custom)); return vis(typename basic_format_arg<Context>::handle(arg.value_.custom));
default:
break;
} }
return vis(monostate()); return vis(monostate());
} }
......
...@@ -2814,6 +2814,8 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end, ...@@ -2814,6 +2814,8 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end,
case '^': case '^':
align = align::center; align = align::center;
break; break;
default:
break;
} }
if (align != align::none) { if (align != align::none) {
if (p != begin) { if (p != begin) {
...@@ -2897,6 +2899,8 @@ FMT_CONSTEXPR const Char* parse_format_specs(const Char* begin, const Char* end, ...@@ -2897,6 +2899,8 @@ FMT_CONSTEXPR const Char* parse_format_specs(const Char* begin, const Char* end,
handler.on_space(); handler.on_space();
++begin; ++begin;
break; break;
default:
break;
} }
if (begin == end) return begin; if (begin == end) return begin;
......
...@@ -106,6 +106,8 @@ SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::set_color_mode(color_mode mode) ...@@ -106,6 +106,8 @@ SPDLOG_INLINE void ansicolor_sink<ConsoleMutex>::set_color_mode(color_mode mode)
case color_mode::never: case color_mode::never:
should_do_colors_ = false; should_do_colors_ = false;
return; return;
default:
should_do_colors_ = false;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment