From 32b6c1687cd293a64e89fe825962fad8b47d4882 Mon Sep 17 00:00:00 2001 From: BevapDin Date: Sat, 9 Nov 2019 19:40:51 +0100 Subject: [PATCH] Inline code of update_config_dir It is only called from one place only. --- src/path_info.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/path_info.cpp b/src/path_info.cpp index f9ecec6a80b35..7970988074787 100644 --- a/src/path_info.cpp +++ b/src/path_info.cpp @@ -24,8 +24,6 @@ static std::string find_translated_file( const std::string &path, const std::string &extension, const std::string &fallback ); -static void update_config_dir(); - static std::string motd_value; static std::string gfxdir_value; static std::string config_dir_value; @@ -79,13 +77,6 @@ void PATH_INFO::init_user_dir( const char *ud ) user_dir_value = dir; } -void update_config_dir() -{ - options_value = config_dir_value + "options.json"; - keymap_value = config_dir_value + "keymap.txt"; - autopickup_value = config_dir_value + "auto_pickup.json"; -} - void PATH_INFO::set_standard_filenames() { // Special: data_dir and gfx_dir @@ -421,7 +412,9 @@ void PATH_INFO::set_datadir( const std::string &datadir ) void PATH_INFO::set_config_dir( const std::string &config_dir ) { config_dir_value = config_dir; - update_config_dir(); + options_value = config_dir_value + "options.json"; + keymap_value = config_dir_value + "keymap.txt"; + autopickup_value = config_dir_value + "auto_pickup.json"; } void PATH_INFO::set_savedir( const std::string &savedir )