diff options
author | Bardur Arantsson <bardur@scientician.net> | 2017-05-02 19:20:57 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2017-05-02 19:20:57 +0200 |
commit | a40a0d1aeddb4742e486f601cbcc7e9ddcc06e2d (patch) | |
tree | da5e8653050f47fc68f14d0062c11273774688e5 /src/dungeon.cc | |
parent | c2ff640e5540fd4c55dd054ae87dd510a11155e9 (diff) |
Move player_{name,base} to Game
Diffstat (limited to 'src/dungeon.cc')
-rw-r--r-- | src/dungeon.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dungeon.cc b/src/dungeon.cc index c1170c93..ce42ecf4 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -4983,6 +4983,7 @@ static void load_all_pref_files(void) { char buf[1024]; + std::string const &player_name = game->player_name; /* Access the "race" pref file */ sprintf(buf, "%s.prf", rp_ptr->title.c_str()); @@ -4997,7 +4998,7 @@ static void load_all_pref_files(void) process_pref_file(buf); /* Access the "character" pref file */ - sprintf(buf, "%s.prf", player_name); + sprintf(buf, "%s.prf", player_name.c_str()); /* Process that file */ process_pref_file(buf); @@ -5008,7 +5009,7 @@ static void load_all_pref_files(void) * the providence of rules and such to avoid the same * duplication problems as caused when saving macros/keymaps. */ boost::filesystem::path userDirectory(ANGBAND_DIR_USER); - if (automatizer_load(userDirectory / (std::string(player_name) + ".atm"))) + if (automatizer_load(userDirectory / (player_name + ".atm"))) { // Done } |