From 6d23012f26fcb0d926b99578d4268af75967227e Mon Sep 17 00:00:00 2001 From: BevapDin Date: Sat, 9 Nov 2019 19:40:24 +0100 Subject: [PATCH] Inline code of update_datadir It is only called from one place anyway. --- src/path_info.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/path_info.cpp b/src/path_info.cpp index 0c6b0243db702..f9ecec6a80b35 100644 --- a/src/path_info.cpp +++ b/src/path_info.cpp @@ -24,7 +24,6 @@ static std::string find_translated_file( const std::string &path, const std::string &extension, const std::string &fallback ); -static void update_datadir(); static void update_config_dir(); static std::string motd_value; @@ -80,15 +79,6 @@ void PATH_INFO::init_user_dir( const char *ud ) user_dir_value = dir; } -void update_datadir() -{ - // Shared dirs - gfxdir_value = datadir_value + "gfx/"; - - // Shared files - motd_value = datadir_value + "motd/" + "en.motd"; -} - void update_config_dir() { options_value = config_dir_value + "options.json"; @@ -421,7 +411,11 @@ std::string PATH_INFO::names() void PATH_INFO::set_datadir( const std::string &datadir ) { datadir_value = datadir; - update_datadir(); + // Shared dirs + gfxdir_value = datadir_value + "gfx/"; + + // Shared files + motd_value = datadir_value + "motd/" + "en.motd"; } void PATH_INFO::set_config_dir( const std::string &config_dir )