Author: silene
Date: Sat Apr  4 23:31:06 2009
New Revision: 34503

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34503&view=rev
Log:
Removed pointer to config.

Modified:
    trunk/src/config_cache.cpp
    trunk/src/serialization/preprocessor.cpp
    trunk/src/serialization/preprocessor.hpp

Modified: trunk/src/config_cache.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config_cache.cpp?rev=34503&r1=34502&r2=34503&view=diff
==============================================================================
--- trunk/src/config_cache.cpp (original)
+++ trunk/src/config_cache.cpp Sat Apr  4 23:31:06 2009
@@ -267,11 +267,11 @@
 
                DBG_CACHE << "Reading cached defines from: " << path << "\n";
 
-               // use static preproc_define::read_pair(config*) to make a 
object
+               // use static preproc_define::read_pair(config) to make a object
                // and pass that object 
config_cache_transaction::insert_to_active method
                foreach (const config::any_child &value, 
cfg.all_children_range()) {
                        config_cache_transaction::instance().insert_to_active(
-                               preproc_define::read_pair(&value.cfg));
+                               preproc_define::read_pair(value.cfg));
                }
        }
 

Modified: trunk/src/serialization/preprocessor.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/serialization/preprocessor.cpp?rev=34503&r1=34502&r2=34503&view=diff
==============================================================================
--- trunk/src/serialization/preprocessor.cpp (original)
+++ trunk/src/serialization/preprocessor.cpp Sat Apr  4 23:31:06 2009
@@ -90,18 +90,16 @@
                read_argument(arg);
 }
 
-preproc_map::value_type preproc_define::read_pair(const config* cfg)
-{
-       std::string first = (*cfg)["name"];
-
+preproc_map::value_type preproc_define::read_pair(const config &cfg)
+{
        preproc_define second;
-       second.read(*cfg);
-       return std::make_pair(first, second);
+       second.read(cfg);
+       return preproc_map::value_type(cfg["name"], second);
 }
 
 std::ostream& operator<<(std::ostream& stream, const preproc_define& def)
 {
-       return stream << std::string("value: ") << def.value << std::string(" 
arguments: ") << def.location;
+       return stream << "value: " << def.value << " arguments: " << 
def.location;
 }
 
 std::ostream& operator<<(std::ostream& stream, const preproc_map::value_type& 
def)

Modified: trunk/src/serialization/preprocessor.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/serialization/preprocessor.hpp?rev=34503&r1=34502&r2=34503&view=diff
==============================================================================
--- trunk/src/serialization/preprocessor.hpp (original)
+++ trunk/src/serialization/preprocessor.hpp Sat Apr  4 23:31:06 2009
@@ -47,7 +47,7 @@
        void write_argument(config_writer&, const std::string&) const;
        void read(const config&);
        void read_argument(const config &);
-       static preproc_map::value_type read_pair(const config*);
+       static preproc_map::value_type read_pair(const config &);
        bool operator==(preproc_define const &) const;
        bool operator<(preproc_define const &) const;
        bool operator!=(preproc_define const &v) const { return !operator==(v); 
}


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to