[vlc-commits] dash: DOMparser: Replacing an init method by an init list.

Hugo Beauzée-Luyssen git at videolan.org
Sat Nov 26 12:34:37 CET 2011


vlc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Nov 25 14:51:46 2011 +0100| [27459888ae70dd9d5ecd7749d47c2356e1b02f86] | committer: Jean-Baptiste Kempf

dash: DOMparser: Replacing an init method by an init list.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=27459888ae70dd9d5ecd7749d47c2356e1b02f86
---

 modules/stream_filter/dash/xml/DOMParser.cpp |   15 +++++++--------
 modules/stream_filter/dash/xml/DOMParser.h   |    1 -
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/stream_filter/dash/xml/DOMParser.cpp b/modules/stream_filter/dash/xml/DOMParser.cpp
index 63ce995..1616167 100644
--- a/modules/stream_filter/dash/xml/DOMParser.cpp
+++ b/modules/stream_filter/dash/xml/DOMParser.cpp
@@ -31,11 +31,14 @@ using namespace dash::xml;
 using namespace dash::http;
 using namespace dash::mpd;
 
-DOMParser::DOMParser    (stream_t *stream)
+DOMParser::DOMParser    (stream_t *stream) :
+    root( NULL ),
+    stream( stream ),
+    vlc_xml( NULL ),
+    vlc_reader( NULL )
 {
-    this->stream = stream;
-    this->init();
 }
+
 DOMParser::~DOMParser   ()
 {
     if(this->vlc_reader)
@@ -123,11 +126,7 @@ void    DOMParser::print                    (Node *node, int offset)
         this->print(node->getSubNodes().at(i), offset);
     }
 }
-void    DOMParser::init                     ()
-{
-    this->root          = NULL;
-    this->vlc_reader    = NULL;
-}
+
 void    DOMParser::print                    ()
 {
     this->print(this->root, 0);
diff --git a/modules/stream_filter/dash/xml/DOMParser.h b/modules/stream_filter/dash/xml/DOMParser.h
index 2042a5f..611a783 100644
--- a/modules/stream_filter/dash/xml/DOMParser.h
+++ b/modules/stream_filter/dash/xml/DOMParser.h
@@ -64,7 +64,6 @@ namespace dash
                 xml_t               *vlc_xml;
                 xml_reader_t        *vlc_reader;
 
-                void    init                    ();
                 Node*   processNode             ();
                 void    addAttributesToNode     (Node *node);
                 void    print                   (Node *node, int offset);



More information about the vlc-commits mailing list