From: Hugo Beauzée-Luyssen Date: Fri, 25 Nov 2011 13:51:46 +0000 (+0100) Subject: dash: DOMparser: Replacing an init method by an init list. X-Git-Tag: 1.3.0-git~48 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=27459888ae70dd9d5ecd7749d47c2356e1b02f86;p=vlc dash: DOMparser: Replacing an init method by an init list. Signed-off-by: Jean-Baptiste Kempf --- diff --git a/modules/stream_filter/dash/xml/DOMParser.cpp b/modules/stream_filter/dash/xml/DOMParser.cpp index 63ce99519b..16161670e9 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 2042a5fe15..611a783ba9 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);