From 27459888ae70dd9d5ecd7749d47c2356e1b02f86 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Fri, 25 Nov 2011 14:51:46 +0100 Subject: [PATCH] dash: DOMparser: Replacing an init method by an init list. Signed-off-by: Jean-Baptiste Kempf --- 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 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); -- 2.39.2