mail[Wesnoth-commits] r27384 - in /trunk/src: unit_map.cpp unit_map.hpp


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

Header


Content

Posted by koraq on June 22, 2008 - 09:37:
Author: mordante
Date: Sun Jun 22 09:36:56 2008
New Revision: 27384

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27384&view=rev
Log:
Add underscore to private members.

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

Modified: trunk/src/unit_map.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_map.cpp?rev=27384&r1=27383&r2=27384&view=diff
==============================================================================
--- trunk/src/unit_map.cpp (original)
+++ trunk/src/unit_map.cpp Sun Jun 22 09:36:56 2008
@@ -145,7 +145,7 @@
        return const_unit_iterator(iter, map_);
 }
 
-unit_map::unit_xy_iterator::unit_xy_iterator(const unit_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) {
+unit_map::unit_xy_iterator::unit_xy_iterator(const unit_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) {
        if (i.valid()) loc_ = i->first;
 }
 
@@ -200,11 +200,11 @@
        return i_ != map_->map_.end() && i_->second.first && loc_ == 
i_->second.second->first;
 }
 
-unit_map::const_unit_xy_iterator::const_unit_xy_iterator(const unit_iterator 
&i) : counter(i.map_), i_(i.i_), map_(i.map_) {
-       if (i.valid()) loc_ = i->first;
-}
-
-unit_map::const_unit_xy_iterator::const_unit_xy_iterator(const 
const_unit_iterator &i) : counter(i.map_), i_(i.i_), map_(i.map_)  {
+unit_map::const_unit_xy_iterator::const_unit_xy_iterator(const unit_iterator 
&i) : counter_(i.map_), i_(i.i_), map_(i.map_) {
+       if (i.valid()) loc_ = i->first;
+}
+
+unit_map::const_unit_xy_iterator::const_unit_xy_iterator(const 
const_unit_iterator &i) : counter_(i.map_), i_(i.i_), map_(i.map_)  {
        if (i.valid()) loc_ = i->first;
 }
 
@@ -258,11 +258,11 @@
 }
 
 
-unit_map::xy_accessor::xy_accessor(const unit_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) {
-       if (i.valid()) loc_ = i->first;
-}
-
-unit_map::xy_accessor::xy_accessor(const unit_xy_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) {
+unit_map::xy_accessor::xy_accessor(const unit_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) {
+       if (i.valid()) loc_ = i->first;
+}
+
+unit_map::xy_accessor::xy_accessor(const unit_xy_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) {
        if (i.valid()) loc_ = i->first;
 }
 
@@ -294,19 +294,19 @@
        return false;
 }
 
-unit_map::const_xy_accessor::const_xy_accessor(const const_unit_iterator &i) 
: counter(i.map_), i_(i.i_), map_(i.map_) {
-       if (i.valid()) loc_ = i->first;
-}
-
-unit_map::const_xy_accessor::const_xy_accessor(const unit_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) {
-       if (i.valid()) loc_ = i->first;
-}
-
-unit_map::const_xy_accessor::const_xy_accessor(const const_unit_xy_iterator 
&i) : counter(i.map_), i_(i.i_), map_(i.map_) {
-       if (i.valid()) loc_ = i->first;
-}
-
-unit_map::const_xy_accessor::const_xy_accessor(const unit_xy_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) {
+unit_map::const_xy_accessor::const_xy_accessor(const const_unit_iterator &i) 
: counter_(i.map_), i_(i.i_), map_(i.map_) {
+       if (i.valid()) loc_ = i->first;
+}
+
+unit_map::const_xy_accessor::const_xy_accessor(const unit_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) {
+       if (i.valid()) loc_ = i->first;
+}
+
+unit_map::const_xy_accessor::const_xy_accessor(const const_unit_xy_iterator 
&i) : counter_(i.map_), i_(i.i_), map_(i.map_) {
+       if (i.valid()) loc_ = i->first;
+}
+
+unit_map::const_xy_accessor::const_xy_accessor(const unit_xy_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) {
        if (i.valid()) loc_ = i->first;
 }
 

Modified: trunk/src/unit_map.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_map.hpp?rev=27384&r1=27383&r2=27384&view=diff
==============================================================================
--- trunk/src/unit_map.hpp (original)
+++ trunk/src/unit_map.hpp Sun Jun 22 09:36:56 2008
@@ -101,13 +101,13 @@
        struct unit_iterator
        {
                unit_iterator() :
-                       counter(),
+                       counter_(),
                        i_(),
                        map_(0)
                { }
                
-               unit_iterator(const unit_iterator &i) : counter(i.map_), 
i_(i.i_), map_(i.map_) { }
-               unit_iterator(umap::iterator i, unit_map* map) : 
counter(map), i_(i), map_(map) { }
+               unit_iterator(const unit_iterator &i) : counter_(i.map_), 
i_(i.i_), map_(i.map_) { }
+               unit_iterator(umap::iterator i, unit_map* map) : 
counter_(map), i_(i), map_(map) { }
                                        
                std::pair<gamemap::location,unit> *operator->() const;
                std::pair<gamemap::location,unit>& operator*() const;
@@ -132,7 +132,7 @@
                friend struct const_xy_accessor;
                
        private:
-               iterator_counter counter;
+               iterator_counter counter_;
                
                umap::iterator i_;
                unit_map* map_;
@@ -140,16 +140,16 @@
        
        struct const_unit_iterator
        {
-               const_unit_iterator(const unit_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) { }
+               const_unit_iterator(const unit_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) { }
                
                const_unit_iterator() :
-                       counter(),
+                       counter_(),
                        i_(),
                        map_(0)
                { }
                                
-               const_unit_iterator(const const_unit_iterator &i) : 
counter(i.map_), i_(i.i_), map_(i.map_) { }
-               const_unit_iterator(umap::const_iterator i, const unit_map* 
map): counter(map), i_(i), map_(map) { }
+               const_unit_iterator(const const_unit_iterator &i) : 
counter_(i.map_), i_(i.i_), map_(i.map_) { }
+               const_unit_iterator(umap::const_iterator i, const unit_map* 
map): counter_(map), i_(i), map_(map) { }
                
                const std::pair<gamemap::location,unit>* operator->() const;
                const std::pair<gamemap::location,unit>& operator*() const;
@@ -173,7 +173,7 @@
                friend struct const_xy_accessor;
                
        private:        
-               iterator_counter counter;
+               iterator_counter counter_;
                                        
                umap::const_iterator i_;        
                const unit_map* map_;
@@ -191,21 +191,21 @@
                unit_xy_iterator(const unit_iterator &i);
                
                unit_xy_iterator() :
-                       counter(),
+                       counter_(),
                        i_(),
                        map_(0),
                        loc_()
                {}
                                
                unit_xy_iterator(const unit_xy_iterator &i) : 
-                       counter(i.map_), 
+                       counter_(i.map_), 
                        i_(i.i_), 
                        map_(i.map_),
                        loc_(i.valid() ? i.loc_ : gamemap::location())
                        { 
                        }
                        
-               unit_xy_iterator(umap::iterator i, unit_map* map, 
gamemap::location loc): counter(map), i_(i), map_(map), loc_(loc) { }
+               unit_xy_iterator(umap::iterator i, unit_map* map, 
gamemap::location loc): counter_(map), i_(i), map_(map), loc_(loc) { }
                
                std::pair<gamemap::location,unit>* operator->() const;
                std::pair<gamemap::location,unit>& operator*() const;
@@ -227,7 +227,7 @@
                friend struct const_xy_accessor;
                
        private:        
-               iterator_counter counter;       
+               iterator_counter counter_;      
                
                umap::iterator i_;      
                unit_map* map_;
@@ -241,17 +241,17 @@
                const_unit_xy_iterator(const const_unit_iterator &i);
                
                const_unit_xy_iterator() :
-                       counter(),
+                       counter_(),
                        i_(),
                        map_(0),
                        loc_()
                { 
                }
                                                        
-               const_unit_xy_iterator(umap::const_iterator i, const 
unit_map* map, gamemap::location loc): counter(map), i_(i), map_(map), 
loc_(loc)  { }
+               const_unit_xy_iterator(umap::const_iterator i, const 
unit_map* map, gamemap::location loc): counter_(map), i_(i), map_(map), 
loc_(loc)  { }
                                        
                const_unit_xy_iterator(const unit_xy_iterator &i) : 
-                       counter(i.map_), 
+                       counter_(i.map_), 
                        i_(i.i_), 
                        map_(i.map_),
                        loc_(i.valid() ? i.loc_ : gamemap::location())
@@ -259,7 +259,7 @@
                }
 
                const_unit_xy_iterator(const const_unit_xy_iterator &i) : 
-                       counter(i.map_), 
+                       counter_(i.map_), 
                        i_(i.i_), 
                        map_(i.map_),
                        loc_(i.valid() ? i.loc_ : gamemap::location())
@@ -284,7 +284,7 @@
                friend struct const_xy_accessor;
                
        private:                
-               iterator_counter counter;
+               iterator_counter counter_;
                
                umap::const_iterator i_;        
                const unit_map* map_;
@@ -301,7 +301,7 @@
                xy_accessor(const unit_iterator &i);
                xy_accessor(const unit_xy_iterator &i);         
                xy_accessor() :
-                       counter(), 
+                       counter_(), 
                        i_(), 
                        map_(),
                        loc_()
@@ -314,7 +314,7 @@
                bool valid();
                
        private:
-               iterator_counter counter;
+               iterator_counter counter_;
                
                umap::iterator i_;
                unit_map* map_;
@@ -330,7 +330,7 @@
                const_xy_accessor(const const_unit_xy_iterator &i);
                                
                const_xy_accessor() :
-                       counter(), 
+                       counter_(), 
                        i_(), 
                        map_(),
                        loc_()
@@ -343,7 +343,7 @@
                bool valid();
                
        private:
-               iterator_counter counter;
+               iterator_counter counter_;
                
                umap::const_iterator i_;
                const unit_map* map_;




Related Messages


Powered by MHonArc, Updated Sun Jun 22 10:41:34 2008