mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user