mail[Wesnoth-commits] r20028 - in /trunk/src: config.cpp config.hpp


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

Header


Content

Posted by david on September 01, 2007 - 17:32:
Author: torangan
Date: Sat Sep  1 17:32:17 2007
New Revision: 20028

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20028&view=rev
Log:
initialize all elements and give normal semantics to operator++()

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

Modified: trunk/src/config.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config.cpp?rev=20028&r1=20027&r2=20028&view=diff
==============================================================================
--- trunk/src/config.cpp (original)
+++ trunk/src/config.cpp Sat Sep  1 17:32:17 2007
@@ -28,7 +28,11 @@
 
 #define ERR_CF LOG_STREAM(err, config)
 
-config::config(const config& cfg)
+config::config() : values(), children(), ordered_children()
+{
+}
+
+config::config(const config& cfg)  : values(), children(), ordered_children()
 {
        append(cfg);
 }
@@ -324,7 +328,7 @@
 
config::all_children_iterator::all_children_iterator(config::all_children_iterator::Itor
 i) : i_(i)
 {}
 
-config::all_children_iterator config::all_children_iterator::operator++()
+config::all_children_iterator& config::all_children_iterator::operator++()
 {
        ++i_;
        return *this;

Modified: trunk/src/config.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config.hpp?rev=20028&r1=20027&r2=20028&view=diff
==============================================================================
--- trunk/src/config.hpp (original)
+++ trunk/src/config.hpp Sat Sep  1 17:32:17 2007
@@ -43,7 +43,7 @@
 {
 public:
        // Create an empty node.
-       config() {}
+       config();
 
        config(const config& cfg);
        ~config();
@@ -113,8 +113,8 @@
                typedef std::vector<child_pos>::const_iterator Itor;
                explicit all_children_iterator(Itor i);
 
-               all_children_iterator operator++();
-               all_children_iterator operator++(int);
+               all_children_iterator& operator++();
+               all_children_iterator  operator++(int);
 
                value_type operator*() const;
 




Related Messages


Powered by MHonArc, Updated Sat Sep 01 18:00:15 2007