mirror of
https://github.com/fmtlib/fmt.git
synced 2025-12-12 22:50:04 +08:00
Fix clang warning
(cherry picked from commit c9bb5468b6ffba250644db86bee0af4bcbb6dc78)
This commit is contained in:
parent
df05947b8a
commit
92d3f31df5
@ -1517,7 +1517,8 @@ class ArgVisitor {
|
||||
*/
|
||||
Result visit(const Arg &arg) {
|
||||
switch (arg.type) {
|
||||
default:
|
||||
case Arg::NONE:
|
||||
case Arg::NAMED_ARG:
|
||||
FMT_ASSERT(false, "invalid argument type");
|
||||
return Result();
|
||||
case Arg::INT:
|
||||
|
||||
@ -708,7 +708,7 @@ TEST(ArgVisitorTest, VisitUnhandledArg) {
|
||||
|
||||
TEST(ArgVisitorTest, VisitInvalidArg) {
|
||||
Arg arg = Arg();
|
||||
arg.type = static_cast<Arg::Type>(Arg::CUSTOM + 1);
|
||||
arg.type = static_cast<Arg::Type>(Arg::NONE);
|
||||
EXPECT_ASSERT(TestVisitor().visit(arg), "invalid argument type");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user