mail[Wesnoth-commits] r20663 - /trunk/src/tstring.cpp


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

Header


Content

Posted by koraq on September 22, 2007 - 12:51:
Author: mordante
Date: Sat Sep 22 12:50:37 2007
New Revision: 20663

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20663&view=rev
Log:
Make sure all members are initialized in the constructor.

Modified:
    trunk/src/tstring.cpp

Modified: trunk/src/tstring.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/tstring.cpp?rev=20663&r1=20662&r2=20663&view=diff
==============================================================================
--- trunk/src/tstring.cpp (original)
+++ trunk/src/tstring.cpp Sat Sep 22 12:50:37 2007
@@ -42,20 +42,22 @@
 
 t_string::walker::walker(const t_string& string) :
        string_(string.value_),
-       begin_(0)
-{
-       if(!string.translatable_) {
-               begin_ = 0;
-               end_ = string_.size();
-               translatable_ = false;
-       } else {
+       begin_(0),
+       end_(string_.size()),
+       textdomain_(),
+       translatable_(false)
+{
+       if(string.translatable_) {
                update();
        }
 }
 
 t_string::walker::walker(const std::string& string) :
        string_(string),
-       begin_(0)
+       begin_(0),
+       end_(string_.size()),
+       textdomain_(),
+       translatable_(false)
 {
        update();
 }
@@ -139,7 +141,9 @@
 
 t_string::t_string() :
        translatable_(false),
-       value_()
+       last_untranslatable_(false),
+       value_(),
+       translated_value_()
 {
 }
 
@@ -153,14 +157,17 @@
 
 t_string::t_string(const std::string& string) :
        translatable_(false),
-       value_(string)
+       last_untranslatable_(false),
+       value_(string),
+       translated_value_()
 {
 }
 
 t_string::t_string(const std::string& string, const std::string& textdomain) 
:
        translatable_(true),
        last_untranslatable_(false),
-       value_(1, ID_TRANSLATABLE_PART)
+       value_(1, ID_TRANSLATABLE_PART),
+       translated_value_()
 {
        std::map<std::string, unsigned int>::const_iterator idi = 
textdomain_to_id.find(textdomain);
        unsigned int id;
@@ -180,7 +187,9 @@
 
 t_string::t_string(const char* string) :
        translatable_(false),
-       value_(string)
+       last_untranslatable_(false),
+       value_(string),
+       translated_value_()
 {
 }
 




Related Messages


Powered by MHonArc, Updated Sat Sep 22 14:21:16 2007