refactor: change enum ipc_command_type to uint32_t

As we always use the enum to compare or initialize uint32_t values, it
would be better to declare it with the right type. This way we could
avoid `-Wnarrowing` warnings or unnecessary type casts.
This commit is contained in:
Aleksei Bavshin
2022-04-10 11:51:01 -07:00
parent a1129c4c87
commit 13fdbc13c3
2 changed files with 15 additions and 13 deletions

View File

@ -45,7 +45,7 @@ Language::Language(const std::string& id, const Json::Value& config)
}
void Language::onCmd(const struct Ipc::ipc_response& res) {
if (res.type != static_cast<uint32_t>(IPC_GET_INPUTS)) {
if (res.type != IPC_GET_INPUTS) {
return;
}
@ -77,7 +77,7 @@ void Language::onCmd(const struct Ipc::ipc_response& res) {
}
void Language::onEvent(const struct Ipc::ipc_response& res) {
if (res.type != static_cast<uint32_t>(IPC_EVENT_INPUT)) {
if (res.type != IPC_EVENT_INPUT) {
return;
}