Browse Source

Fixed error: returning 'SDL_TrayEntry **' from a function with incompatible return type 'const SDL_TrayEntry **'

Sam Lantinga 3 months ago
parent
commit
8d8649b33f
3 changed files with 3 additions and 3 deletions
  1. 1 1
      src/tray/cocoa/SDL_tray.m
  2. 1 1
      src/tray/unix/SDL_tray.c
  3. 1 1
      src/tray/windows/SDL_tray.c

+ 1 - 1
src/tray/cocoa/SDL_tray.m

@@ -281,7 +281,7 @@ const SDL_TrayEntry **SDL_GetTrayEntries(SDL_TrayMenu *menu, int *size)
     if (size) {
         *size = menu->nEntries;
     }
-    return menu->entries;
+    return (const SDL_TrayEntry **)menu->entries;
 }
 
 void SDL_RemoveTrayEntry(SDL_TrayEntry *entry)

+ 1 - 1
src/tray/unix/SDL_tray.c

@@ -494,7 +494,7 @@ const SDL_TrayEntry **SDL_GetTrayEntries(SDL_TrayMenu *menu, int *size)
     if (size) {
         *size = menu->nEntries;
     }
-    return menu->entries;
+    return (const SDL_TrayEntry **)menu->entries;
 }
 
 void SDL_RemoveTrayEntry(SDL_TrayEntry *entry)

+ 1 - 1
src/tray/windows/SDL_tray.c

@@ -310,7 +310,7 @@ const SDL_TrayEntry **SDL_GetTrayEntries(SDL_TrayMenu *menu, int *size)
     if (size) {
         *size = menu->nEntries;
     }
-    return menu->entries;
+    return (const SDL_TrayEntry **)menu->entries;
 }
 
 void SDL_RemoveTrayEntry(SDL_TrayEntry *entry)