mail[Wesnoth-commits] r20029 - in /trunk/src: color_range.hpp filesystem.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:42:
Author: torangan
Date: Sat Sep  1 17:42:01 2007
New Revision: 20029

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20029&view=rev
Log:
initialize all member in intialization list

Modified:
    trunk/src/color_range.hpp
    trunk/src/filesystem.hpp

Modified: trunk/src/color_range.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/color_range.hpp?rev=20029&r1=20028&r2=20029&view=diff
==============================================================================
--- trunk/src/color_range.hpp (original)
+++ trunk/src/color_range.hpp Sat Sep  1 17:42:01 2007
@@ -39,13 +39,13 @@
 public:
   color_range(Uint32 mid , Uint32 max = 0x00FFFFFF , Uint32 min = 0x00000000 
, Uint32 rep = 0x00808080):mid_(mid),max_(max),min_(min),rep_(rep){};
   color_range(const std::vector<Uint32>& v)
+    : mid_(v.size()     ? v[0] : 0x00808080),
+      max_(v.size() > 1 ? v[1] : 0x00FFFFFF),
+      min_(v.size() > 2 ? v[2] : 0x00000000),
+      rep_(v.size() > 3 ? v[3] : mid_)
   {
-    mid_ = v.size() ? v[0] : 0x00808080;
-    max_ = v.size() > 1 ? v[1] : 0x00FFFFFF;
-    min_ = v.size() > 2 ? v[2] : 0x00000000;
-    rep_ = v.size() > 3 ? v[3] : mid_;
   };
-  color_range(){color_range(0x00808080,0x00FFFFFF,0x00000000,0x00808080);};
+  color_range() : mid_(0x00808080), max_(0x00FFFFFF), min_(0x00000000), 
rep_(0x00808080) {};
   Uint32 mid() const{return(mid_);};
   Uint32 max() const{return(max_);};
   Uint32 min() const{return(min_);};

Modified: trunk/src/filesystem.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/filesystem.hpp?rev=20029&r1=20028&r2=20029&view=diff
==============================================================================
--- trunk/src/filesystem.hpp (original)
+++ trunk/src/filesystem.hpp Sat Sep  1 17:42:01 2007
@@ -22,7 +22,7 @@
 
 //an exception object used when an IO error occurs
 struct io_exception : public std::exception {
-       io_exception() {}
+       io_exception() : message("") {}
        io_exception(const std::string& msg) : message(msg) {}
        virtual ~io_exception() throw() {}
 




Related Messages


Powered by MHonArc, Updated Sat Sep 01 18:20:12 2007