mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 19:52:11 +00:00
Fixed compilation with boost 1.33
This commit is contained in:
parent
cdc198e8b1
commit
1d6c5db680
@ -264,11 +264,6 @@ namespace game_config {
|
||||
add_defines_map_diff(copy_map);
|
||||
}
|
||||
|
||||
void config_cache::add_define_from_file(const config::all_children_iterator::value_type& value)
|
||||
{
|
||||
config_cache_transaction::instance().insert_to_active(
|
||||
preproc_define::read_pair(value.second));
|
||||
}
|
||||
|
||||
void config_cache::read_defines_file(const std::string& path)
|
||||
{
|
||||
@ -280,10 +275,7 @@ namespace game_config {
|
||||
// use static preproc_define::read_pair(config*) to make a object
|
||||
// and pass that object config_cache_transaction::insert_to_active method
|
||||
std::for_each(cfg.ordered_begin(), cfg.ordered_end(),
|
||||
boost::bind(&config_cache::add_define_from_file,
|
||||
this,
|
||||
_1)
|
||||
);
|
||||
add_define_from_file());
|
||||
}
|
||||
|
||||
void config_cache::read_defines_queue()
|
||||
|
@ -98,7 +98,6 @@ namespace game_config {
|
||||
void read_configs(const std::string& path, config& cfg, preproc_map& defines);
|
||||
void load_configs(const std::string& path, config& cfg);
|
||||
void read_defines_queue();
|
||||
void add_define_from_file(const config::all_children_iterator::value_type& value);
|
||||
void read_defines_file(const std::string& path);
|
||||
|
||||
preproc_map& make_copy_map();
|
||||
@ -171,6 +170,7 @@ namespace game_config {
|
||||
|
||||
};
|
||||
|
||||
struct add_define_from_file;
|
||||
class fake_transaction;
|
||||
/**
|
||||
* Used to share macros between load operations
|
||||
@ -207,6 +207,7 @@ namespace game_config {
|
||||
static config_cache_transaction& instance()
|
||||
{ assert(active_); return *active_; }
|
||||
friend class config_cache;
|
||||
friend class add_define_from_file;
|
||||
friend class fake_transaction;
|
||||
const filenames& get_define_files() const;
|
||||
void add_define_file(const std::string&);
|
||||
@ -214,6 +215,15 @@ namespace game_config {
|
||||
void add_defines_map_diff(preproc_map& defines_map);
|
||||
};
|
||||
|
||||
struct add_define_from_file {
|
||||
void operator()(const config::all_children_iterator::value_type& value) const
|
||||
{
|
||||
config_cache_transaction::instance().insert_to_active(
|
||||
preproc_define::read_pair(value.second));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Holds a fake cache transaction if no real one is used
|
||||
**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user