mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 00:12:02 +00:00
move extract_summary_from_config fcn to private namespace
Since it is only used there anyways
This commit is contained in:
parent
8382f068bd
commit
111424a589
@ -123,6 +123,7 @@ static lg::log_domain log_enginerefac("enginerefac");
|
|||||||
|
|
||||||
namespace savegame {
|
namespace savegame {
|
||||||
|
|
||||||
|
void extract_summary_from_config(config &, config &);
|
||||||
|
|
||||||
void save_index_class::rebuild(const std::string& name) {
|
void save_index_class::rebuild(const std::string& name) {
|
||||||
std::string filename = name;
|
std::string filename = name;
|
||||||
@ -138,7 +139,7 @@ void save_index_class::rebuild(const std::string& name, const time_t& modified)
|
|||||||
config full;
|
config full;
|
||||||
std::string dummy;
|
std::string dummy;
|
||||||
read_save_file(name, full, &dummy);
|
read_save_file(name, full, &dummy);
|
||||||
::extract_summary_from_config(full, summary);
|
extract_summary_from_config(full, summary);
|
||||||
} catch(game::load_game_failed&) {
|
} catch(game::load_game_failed&) {
|
||||||
summary["corrupt"] = true;
|
summary["corrupt"] = true;
|
||||||
}
|
}
|
||||||
@ -402,8 +403,6 @@ save_info create_save_info::operator()(const std::string& filename) const
|
|||||||
return save_info(name, modified);
|
return save_info(name, modified);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace savegame
|
|
||||||
|
|
||||||
void extract_summary_from_config(config& cfg_save, config& cfg_summary)
|
void extract_summary_from_config(config& cfg_save, config& cfg_summary)
|
||||||
{
|
{
|
||||||
const config &cfg_snapshot = cfg_save.child("snapshot");
|
const config &cfg_snapshot = cfg_save.child("snapshot");
|
||||||
@ -507,3 +506,5 @@ void extract_summary_from_config(config& cfg_save, config& cfg_summary)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} // end namespace savegame
|
||||||
|
@ -98,8 +98,6 @@ private:
|
|||||||
extern save_index_class save_index_manager;
|
extern save_index_class save_index_manager;
|
||||||
} //end of namespace savegame
|
} //end of namespace savegame
|
||||||
|
|
||||||
|
|
||||||
void extract_summary_from_config(config& cfg_save, config& cfg_summary);
|
|
||||||
void replace_underbar2space(std::string &name);
|
void replace_underbar2space(std::string &name);
|
||||||
void replace_space2underbar(std::string &name);
|
void replace_space2underbar(std::string &name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user