From e160c2f9d1dc3439d3fae7a049e28f15a4ad4162 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Sun, 31 Aug 2008 09:40:22 +0000 Subject: [PATCH] Revert "Fixing bind problems using boost lambda?" Doesn't work with 1.34 --- src/config_cache.cpp | 11 +++-------- src/config_cache.hpp | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/config_cache.cpp b/src/config_cache.cpp index c5d02653cfe..f3fddea941c 100644 --- a/src/config_cache.cpp +++ b/src/config_cache.cpp @@ -26,8 +26,6 @@ #include "serialization/binary_or_text.hpp" #include "serialization/parser.hpp" -#include -#include #include #define ERR_CACHE LOG_STREAM(err, cache) @@ -266,7 +264,7 @@ namespace game_config { add_defines_map_diff(copy_map); } - void config_cache::add_define_from_file(const config::all_children_iterator::value_type value) const + 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)); @@ -274,9 +272,6 @@ namespace game_config { void config_cache::read_defines_file(const std::string& path) { - using namespace boost::lambda; - boost::lambda::placeholder1_type X; - config cfg; read_file(path, cfg); @@ -285,9 +280,9 @@ 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(), - bind(&config_cache::add_define_from_file, + boost::bind(&config_cache::add_define_from_file, this, - X) + _1) ); } diff --git a/src/config_cache.hpp b/src/config_cache.hpp index d8d1316b99c..a41d0c672bf 100644 --- a/src/config_cache.hpp +++ b/src/config_cache.hpp @@ -98,7 +98,7 @@ 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) const; + 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();