Skip to content

Commit 874e0e0

Browse files
committed
fix(PatternCompiler): eliminate implicit fallthrough by separating logic for 's' and 'E'
1 parent 8efee18 commit 874e0e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/logit_cpp/logit/formatter/compiler/PatternCompiler.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,10 @@ namespace logit {
552552
strip_ansi = true;
553553
++i; // Skip 'c' after 's'
554554
break;
555+
} else {
556+
instructions.emplace_back(context, FormatType::TimeStamp, width, left_align, center_align, truncate, strip_ansi);
555557
}
558+
break;
556559
case 'E':
557560
if ((i + 1) < pattern.size() && pattern[i + 1] == 'C') {
558561
strip_ansi = false;
@@ -561,7 +564,6 @@ namespace logit {
561564
}
562565
instructions.emplace_back(context, FormatType::TimeStamp, width, left_align, center_align, truncate, strip_ansi);
563566
break;
564-
565567
// Weekday and Month Names
566568
case 'b':
567569
if ((i + 1) < pattern.size() && pattern[i + 1] == 's') {

0 commit comments

Comments
 (0)