From 8c41afa951ac86ca910dbeac3e5d8c8a06b80aed Mon Sep 17 00:00:00 2001 From: BevapDin Date: Sun, 10 Nov 2019 11:16:37 +0100 Subject: [PATCH] Extract FILENAMES["options"] into a static variable --- src/path_info.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/path_info.cpp b/src/path_info.cpp index 4c2c1ff5de9c2..724422ffcf188 100644 --- a/src/path_info.cpp +++ b/src/path_info.cpp @@ -37,6 +37,7 @@ static std::string base_path_value; static std::string savedir_value; static std::string autopickup_value; static std::string keymap_value; +static std::string options_value; /** Map where we store filenames */ std::map FILENAMES; @@ -117,7 +118,7 @@ void update_datadir() void update_config_dir() { - update_pathname( "options", config_dir_value + "options.json" ); + options_value = config_dir_value + "options.json"; keymap_value = config_dir_value + "keymap.txt"; autopickup_value = config_dir_value + "auto_pickup.json"; } @@ -173,7 +174,7 @@ void PATH_INFO::set_standard_filenames() #else config_dir_value = user_dir_value + "config/"; #endif - update_pathname( "options", config_dir_value + "options.json" ); + options_value = config_dir_value + "options.json"; keymap_value = config_dir_value + "keymap.txt"; autopickup_value = config_dir_value + "auto_pickup.json"; } @@ -355,7 +356,7 @@ std::string PATH_INFO::moddir() } std::string PATH_INFO::options() { - return FILENAMES["options"]; + return options_value; } std::string PATH_INFO::panel_options() { @@ -479,7 +480,7 @@ void PATH_INFO::set_memorialdir( const std::string &memorialdir ) void PATH_INFO::set_options( const std::string &options ) { - update_pathname( "options", options ); + options_value = options; } void PATH_INFO::set_keymap( const std::string &keymap )