SDL: Fixed warning C6313: Incorrect operator. Use an equality test to check for zero-valued flags.

From 656c519cca9c9266021cd7f568c30ea2663881d9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 17 Jan 2025 12:08:45 -0800
Subject: [PATCH] Fixed warning C6313: Incorrect operator. Use an equality test
 to check for zero-valued flags.

---
 src/tray/unix/SDL_tray.c    | 6 ++++--
 src/tray/windows/SDL_tray.c | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/tray/unix/SDL_tray.c b/src/tray/unix/SDL_tray.c
index cc57fd78114d2..39deab4e5db64 100644
--- a/src/tray/unix/SDL_tray.c
+++ b/src/tray/unix/SDL_tray.c
@@ -591,12 +591,14 @@ SDL_TrayEntry *SDL_InsertTrayEntryAt(SDL_TrayMenu *menu, int pos, const char *la
         entry->item = gtk_separator_menu_item_new();
     } else if (flags & SDL_TRAYENTRY_CHECKBOX) {
         entry->item = gtk_check_menu_item_new_with_label(label);
-        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(entry->item), !!(flags & SDL_TRAYENTRY_CHECKED));
+        gboolean active = ((flags & SDL_TRAYENTRY_CHECKED) != 0);
+        gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(entry->item), active);
     } else {
         entry->item = gtk_menu_item_new_with_label(label);
     }
 
-    gtk_widget_set_sensitive(entry->item, !(flags & SDL_TRAYENTRY_DISABLED));
+    gboolean sensitive = ((flags & SDL_TRAYENTRY_DISABLED) == 0);
+    gtk_widget_set_sensitive(entry->item, sensitive);
 
     SDL_TrayEntry **new_entries = (SDL_TrayEntry **)SDL_realloc(menu->entries, (menu->nEntries + 2) * sizeof(*new_entries));
 
diff --git a/src/tray/windows/SDL_tray.c b/src/tray/windows/SDL_tray.c
index 526c19004ef18..f5eb6da261571 100644
--- a/src/tray/windows/SDL_tray.c
+++ b/src/tray/windows/SDL_tray.c
@@ -523,7 +523,7 @@ bool SDL_GetTrayEntryChecked(SDL_TrayEntry *entry)
 
     GetMenuItemInfoW(entry->parent->hMenu, (UINT) entry->id, FALSE, &mii);
 
-    return !!(mii.fState & MFS_CHECKED);
+    return ((mii.fState & MFS_CHECKED) != 0);
 }
 
 void SDL_SetTrayEntryEnabled(SDL_TrayEntry *entry, bool enabled)
@@ -549,7 +549,7 @@ bool SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry)
 
     GetMenuItemInfoW(entry->parent->hMenu, (UINT) entry->id, FALSE, &mii);
 
-    return !!(mii.fState & MFS_ENABLED);
+    return ((mii.fState & MFS_ENABLED) != 0);
 }
 
 void SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata)