minor code improvement
authorHolger Schemel <info@artsoft.org>
Mon, 19 Oct 2020 21:05:45 +0000 (23:05 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 23:57:58 +0000 (00:57 +0100)
src/screens.c

index 3b9504bc0d23682859a96ededc5c76c6c9205e2a..c62ffec9c533d9ca8a8508990b772a46d3880ed3 100644 (file)
@@ -4072,12 +4072,7 @@ static void setTypeNameValues(char *name, int *font, boolean success)
       return;
 
     if (success)
-    {
-      node->color = FC_RED;
-
-      if (strEqual(name, EMPTY_PLAYER_NAME))
-       node->color = FC_BLUE;
-    }
+      node->color = (strEqual(name, EMPTY_PLAYER_NAME) ? FC_BLUE : FC_RED);
 
     *font = FONT_TEXT_1 + node->color;
   }