From b47b3780ecbc8260ffd8d3cf1562a32c449e84b7 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 2 Feb 2021 12:54:31 +0100 Subject: [PATCH] replaced string texts with predefined string constants --- src/libgame/setup.c | 4 ++-- src/libgame/system.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libgame/setup.c b/src/libgame/setup.c index a4228a4e..8f98ff01 100644 --- a/src/libgame/setup.c +++ b/src/libgame/setup.c @@ -2882,7 +2882,7 @@ static TreeInfo *createParentTreeInfoNode(TreeInfo *node_parent) ti_new->parent_link = TRUE; setString(&ti_new->identifier, node_parent->identifier); - setString(&ti_new->name, ".. (parent directory)"); + setString(&ti_new->name, BACKLINK_TEXT_PARENT); setString(&ti_new->name_sorting, ti_new->name); setString(&ti_new->subdir, STRING_PARENT_DIRECTORY); @@ -2928,7 +2928,7 @@ static TreeInfo *createTopTreeInfoNode(TreeInfo *node_first) TreeInfo *ti_new2 = createParentTreeInfoNode(ti_new); - setString(&ti_new2->name, ".. (main menu)"); + setString(&ti_new2->name, BACKLINK_TEXT_MAIN); setString(&ti_new2->name_sorting, ti_new2->name); return ti_new; diff --git a/src/libgame/system.h b/src/libgame/system.h index 46124b82..87c56d69 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -782,6 +782,9 @@ #define INFOTEXT_LEVEL_NR "Levels" #define INFOTEXT_PLAYER_NAME "Players & Teams" +#define BACKLINK_TEXT_MAIN ".. (main menu)" +#define BACKLINK_TEXT_PARENT ".. (parent directory)" + #define TREE_INFOTEXT(t) ((t) == TREE_TYPE_PLAYER_NAME ? \ INFOTEXT_PLAYER_NAME : \ (t) == TREE_TYPE_LEVEL_NR ? \ -- 2.34.1