mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
Fix clang warning
This commit is contained in:
@ -1514,7 +1514,8 @@ class ArgVisitor {
|
|||||||
*/
|
*/
|
||||||
Result visit(const Arg &arg) {
|
Result visit(const Arg &arg) {
|
||||||
switch (arg.type) {
|
switch (arg.type) {
|
||||||
default:
|
case Arg::NONE:
|
||||||
|
case Arg::NAMED_ARG:
|
||||||
FMT_ASSERT(false, "invalid argument type");
|
FMT_ASSERT(false, "invalid argument type");
|
||||||
return Result();
|
return Result();
|
||||||
case Arg::INT:
|
case Arg::INT:
|
||||||
|
@ -708,7 +708,7 @@ TEST(ArgVisitorTest, VisitUnhandledArg) {
|
|||||||
|
|
||||||
TEST(ArgVisitorTest, VisitInvalidArg) {
|
TEST(ArgVisitorTest, VisitInvalidArg) {
|
||||||
Arg arg = Arg();
|
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");
|
EXPECT_ASSERT(TestVisitor().visit(arg), "invalid argument type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user