core: Remove unnecessary enum casts in log calls

Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.
This commit is contained in:
Lioncash 2020-12-07 22:00:34 -05:00
parent 3415890dd5
commit 6b7320add4
25 changed files with 90 additions and 96 deletions

View file

@ -30,7 +30,7 @@ bool IsConnectionBased(Type type) {
case Type::DGRAM:
return false;
default:
UNIMPLEMENTED_MSG("Unimplemented type={}", static_cast<int>(type));
UNIMPLEMENTED_MSG("Unimplemented type={}", type);
return false;
}
}
@ -636,7 +636,7 @@ std::pair<s32, Errno> BSD::FcntlImpl(s32 fd, FcntlCmd cmd, s32 arg) {
return {0, Errno::SUCCESS};
}
default:
UNIMPLEMENTED_MSG("Unimplemented cmd={}", static_cast<int>(cmd));
UNIMPLEMENTED_MSG("Unimplemented cmd={}", cmd);
return {-1, Errno::SUCCESS};
}
}
@ -679,7 +679,7 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, size_t optlen, con
case OptName::RCVTIMEO:
return Translate(socket->SetRcvTimeo(value));
default:
UNIMPLEMENTED_MSG("Unimplemented optname={}", static_cast<int>(optname));
UNIMPLEMENTED_MSG("Unimplemented optname={}", optname);
return Errno::SUCCESS;
}
}

View file

@ -27,7 +27,7 @@ Errno Translate(Network::Errno value) {
case Network::Errno::NOTCONN:
return Errno::NOTCONN;
default:
UNIMPLEMENTED_MSG("Unimplemented errno={}", static_cast<int>(value));
UNIMPLEMENTED_MSG("Unimplemented errno={}", value);
return Errno::SUCCESS;
}
}
@ -41,7 +41,7 @@ Network::Domain Translate(Domain domain) {
case Domain::INET:
return Network::Domain::INET;
default:
UNIMPLEMENTED_MSG("Unimplemented domain={}", static_cast<int>(domain));
UNIMPLEMENTED_MSG("Unimplemented domain={}", domain);
return {};
}
}
@ -51,7 +51,7 @@ Domain Translate(Network::Domain domain) {
case Network::Domain::INET:
return Domain::INET;
default:
UNIMPLEMENTED_MSG("Unimplemented domain={}", static_cast<int>(domain));
UNIMPLEMENTED_MSG("Unimplemented domain={}", domain);
return {};
}
}
@ -63,7 +63,7 @@ Network::Type Translate(Type type) {
case Type::DGRAM:
return Network::Type::DGRAM;
default:
UNIMPLEMENTED_MSG("Unimplemented type={}", static_cast<int>(type));
UNIMPLEMENTED_MSG("Unimplemented type={}", type);
}
}
@ -84,7 +84,7 @@ Network::Protocol Translate(Type type, Protocol protocol) {
case Protocol::UDP:
return Network::Protocol::UDP;
default:
UNIMPLEMENTED_MSG("Unimplemented protocol={}", static_cast<int>(protocol));
UNIMPLEMENTED_MSG("Unimplemented protocol={}", protocol);
return Network::Protocol::TCP;
}
}
@ -157,7 +157,7 @@ Network::ShutdownHow Translate(ShutdownHow how) {
case ShutdownHow::RDWR:
return Network::ShutdownHow::RDWR;
default:
UNIMPLEMENTED_MSG("Unimplemented how={}", static_cast<int>(how));
UNIMPLEMENTED_MSG("Unimplemented how={}", how);
return {};
}
}