diff --git a/src/fileio/fileio.hpp b/src/fileio/fileio.hpp index 766b235d..e1221eeb 100644 --- a/src/fileio/fileio.hpp +++ b/src/fileio/fileio.hpp @@ -21,7 +21,7 @@ class cUniverse; fs::path locate_scenario(std::string scen_name); bool load_scenario(fs::path file_to_load, cScenario& scenario, bool only_header = false); -bool load_party(fs::path file_to_load, cUniverse& univ); +bool load_party(fs::path const &file_to_load, cUniverse& univ); bool save_party(fs::path dest_file, const cUniverse& univ); void init_directories(const char* exec_path); diff --git a/src/fileio/fileio_party.cpp b/src/fileio/fileio_party.cpp index cc5dd274..0662a674 100644 --- a/src/fileio/fileio_party.cpp +++ b/src/fileio/fileio_party.cpp @@ -24,10 +24,10 @@ extern fs::path progDir, tempDir; extern cCustomGraphics spec_scen_g; // Load saved games -static bool load_party_v1(fs::path file_to_load, cUniverse& univ, bool town_restore, bool in_scen, bool maps_there, bool mac_file); -static bool load_party_v2(fs::path file_to_load, cUniverse& univ); +static bool load_party_v1(fs::path const &file_to_load, cUniverse& univ, bool town_restore, bool in_scen, bool maps_there, bool mac_file); +static bool load_party_v2(fs::path const &file_to_load, cUniverse& univ); -bool load_party(fs::path file_to_load, cUniverse& univ){ +bool load_party(fs::path const &file_to_load, cUniverse& univ){ bool town_restore = false; bool maps_there = false; bool in_scen = false; @@ -105,7 +105,7 @@ bool load_party(fs::path file_to_load, cUniverse& univ){ return true; } -bool load_party_v1(fs::path file_to_load, cUniverse& real_univ, bool town_restore, bool in_scen, bool maps_there, bool mac_file){ +bool load_party_v1(fs::path const &file_to_load, cUniverse& real_univ, bool town_restore, bool in_scen, bool maps_there, bool mac_file){ std::ifstream fin(file_to_load.string().c_str(), std::ios_base::binary); fin.seekg(3*sizeof(short),std::ios_base::beg); // skip the header, which is 6 bytes in the old format @@ -256,7 +256,7 @@ bool load_party_v1(fs::path file_to_load, cUniverse& real_univ, bool town_restor } extern fs::path scenDir; -bool load_party_v2(fs::path file_to_load, cUniverse& real_univ){ +bool load_party_v2(fs::path const &file_to_load, cUniverse& real_univ){ igzstream zin(file_to_load.string().c_str()); tarball partyIn; partyIn.readFrom(zin);