mail[Wesnoth-commits] r28438 - /trunk/src/server/simple_wml.cpp


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

Header


Content

Posted by koraq on August 10, 2008 - 17:34:
Author: mordante
Date: Sun Aug 10 17:19:30 2008
New Revision: 28438

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28438&view=rev
Log:
Initialize all members.

Modified:
    trunk/src/server/simple_wml.cpp

Modified: trunk/src/server/simple_wml.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/simple_wml.cpp?rev=28438&r1=28437&r2=28438&view=diff
==============================================================================
--- trunk/src/server/simple_wml.cpp (original)
+++ trunk/src/server/simple_wml.cpp Sun Aug 10 17:19:30 2008
@@ -123,13 +123,21 @@
        return o;
 }
 
-node::node(document& doc, node* parent)
-  : doc_(&doc), parent_(parent)
-{
-}
-
-node::node(document& doc, node* parent, const char** str, int depth)
-  : doc_(&doc), parent_(parent)
+node::node(document& doc, node* parent) :
+       doc_(&doc), 
+       attr_(),
+       parent_(parent),
+       children_(),
+       output_cache_()
+{
+}
+
+node::node(document& doc, node* parent, const char** str, int depth) :
+       doc_(&doc), 
+       attr_(),
+       parent_(parent),
+       children_(),
+       output_cache_()
 {
        if(depth >= 30) {
                throw error("elements nested too deep");
@@ -695,13 +703,24 @@
        }
 }
 
-document::document() : output_(NULL),
-                                          root_(new node(*this, NULL))
+document::document() : 
+       compressed_buf_(),
+       output_(NULL), 
+       buffers_(),
+       root_(new node(*this, NULL)),
+       prev_(NULL),
+       next_(NULL)
 {
        attach_list();
 }
 
-document::document(char* buf, INIT_BUFFER_CONTROL control) : output_(buf), 
root_(NULL)
+document::document(char* buf, INIT_BUFFER_CONTROL control) : 
+       compressed_buf_(),
+       output_(buf), 
+       buffers_(),
+       root_(NULL),
+       prev_(NULL),
+       next_(NULL)
 {
        if(control == INIT_TAKE_OWNERSHIP) {
                buffers_.push_back(buf);
@@ -712,10 +731,14 @@
        attach_list();
 }
 
-document::document(const char* buf, INIT_STATE state) : output_(NULL),
-                                                        root_(NULL)
-{
-       output_ = buf;
+document::document(const char* buf, INIT_STATE state) : 
+       compressed_buf_(),
+       output_(buf),
+       buffers_(),
+       root_(NULL),
+       prev_(NULL),
+       next_(NULL)
+{
        if(state == INIT_COMPRESSED) {
                output_compressed();
                output_ = NULL;
@@ -726,10 +749,13 @@
        attach_list();
 }
 
-document::document(string_span compressed_buf)
-  : compressed_buf_(compressed_buf),
-    output_(NULL),
-       root_(NULL)
+document::document(string_span compressed_buf) :
+       compressed_buf_(compressed_buf),
+       output_(NULL),
+       buffers_(),
+       root_(NULL),
+       prev_(NULL),
+       next_(NULL)
 {
        string_span uncompressed_buf;
        buffers_.push_back(uncompress_buffer(compressed_buf, 
&uncompressed_buf));




Related Messages


Powered by MHonArc, Updated Sun Aug 10 19:01:55 2008