Skip to content

Commit

Permalink
Inline code of update_config_dir
Browse files Browse the repository at this point in the history
It is only called from one place only.
  • Loading branch information
BevapDin committed Nov 17, 2019
1 parent 6d23012 commit 32b6c16
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/path_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit 32b6c16

Please sign in to comment.