Selaa lähdekoodia

Christoph Mallon: Simplify assignment.

Sam Lantinga 11 vuotta sitten
vanhempi
commit
9e23d17869
1 muutettua tiedostoa jossa 1 lisäystä ja 5 poistoa
  1. 1 5
      src/SDL_hints.c

+ 1 - 5
src/SDL_hints.c

@@ -75,11 +75,7 @@ SDL_SetHintWithPriority(const char *name, const char *value,
                 if (hint->value) {
                     SDL_free(hint->value);
                 }
-                if (value) {
-                    hint->value = SDL_strdup(value);
-                } else {
-                    hint->value = NULL;
-                }
+                hint->value = value ? SDL_strdup(value) : NULL;
             }
             hint->priority = priority;
             return SDL_TRUE;