From a334eb4a291c3d3ec26b21ec238f190c0a655c75 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 21 May 2021 01:59:09 +0300 Subject: [PATCH 28/28] Inline is_server() See osdn #42331 Signed-off-by: Marko Lindqvist --- common/game.c | 8 -------- common/game.h | 11 ++++++++++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/common/game.c b/common/game.c index 1cf4badb0b..eea307d6c3 100644 --- a/common/game.c +++ b/common/game.c @@ -84,14 +84,6 @@ bool am_i_server = FALSE; static void game_defaults(void); -/************************************************************************** - Is program type server? -**************************************************************************/ -bool is_server(void) -{ - return am_i_server; -} - /************************************************************************** Set program type to server. **************************************************************************/ diff --git a/common/game.h b/common/game.h index 9697f85030..51e5204876 100644 --- a/common/game.h +++ b/common/game.h @@ -284,7 +284,16 @@ struct civ_game { } callbacks; }; -bool is_server(void); +extern bool am_i_server; + +/************************************************************************** + Is the program type server? +**************************************************************************/ +static inline bool is_server(void) +{ + return am_i_server; +} + void i_am_server(void); void i_am_client(void); -- 2.30.2