mail[Wesnoth-commits] r43308 - in /trunk/src: persist_context.cpp persist_context.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by alinktomine on June 12, 2010 - 15:24:
Author: alink
Date: Sat Jun 12 15:24:58 2010
New Revision: 43308

URL: http://svn.gna.org/viewcvs/wesnoth?rev=43308&view=rev
Log:
Fix a typo/error and several warnings in r43306

Modified:
    trunk/src/persist_context.cpp
    trunk/src/persist_context.hpp

Modified: trunk/src/persist_context.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/persist_context.cpp?rev=43308&r1=43307&r2=43308&view=diff
==============================================================================
--- trunk/src/persist_context.cpp (original)
+++ trunk/src/persist_context.cpp Sat Jun 12 15:24:58 2010
@@ -83,7 +83,7 @@
        cfg[name] = val;
        return cfg;
 }
-persist_context &persist_context::add_child(const std::string &key)  {
+persist_context &persist_context::add_child(const std::string& /*key*/)  {
 //     children_[key] = new persist_context(namespace_.namespace_ + "." + 
key,this);
 //     children_[key]->cfg_.child_or_add(key);
        return *this;//(children_[key]);

Modified: trunk/src/persist_context.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/persist_context.hpp?rev=43308&r1=43307&r2=43308&view=diff
==============================================================================
--- trunk/src/persist_context.hpp (original)
+++ trunk/src/persist_context.hpp Sat Jun 12 15:24:58 2010
@@ -35,7 +35,7 @@
                }
                void parse() {
                        while (namespace_.find_first_of("^") < 
namespace_.size()) {
-                               if (namespace_[0] = '^') {
+                               if (namespace_[0] == '^') {
                                        //TODO: Throw a WML error
                                        namespace_ = "";
                                        break;
@@ -78,16 +78,16 @@
                }
        };
        // TODO: transaction support (needed for MP)
+       name_space namespace_;
        config cfg_;
-       name_space namespace_;
        struct node {
                typedef std::map<std::string,node*> child_map;
                std::string name_;
                persist_context *root_;
+               config &cfg_;
                node *parent_;
                child_map children_;
-               config &cfg_;
-               node(std::string name, persist_context *root, config & cfg, 
node *parent = NULL) : name_(name), root_(root), cfg_(cfg),parent_(parent) { 
+               node(std::string name, persist_context *root, config & cfg, 
node *parent = NULL) : name_(name), root_(root), cfg_(cfg),parent_(parent) {
                }
                ~node() {
                        for (child_map::iterator i = children_.begin(); i != 
children_.end(); i++)
@@ -117,9 +117,9 @@
                                cfg_.add_child("variables");
                }
        };
+       bool valid_;
        node root_node_;
        node *active_;
-       bool valid_;
        void load();
        void init();
        bool save_context();




Related Messages


Powered by MHonArc, Updated Sat Jun 12 16:00:13 2010