summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-08 00:17:45 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-08 00:17:45 +0300
commit593cccb16074fe9269dd2f278bd79859769eb1fd (patch)
treed8b3d93001021c59622ea88140dbbef8aee05013 /src/utils
parentb7e35a7bbd41c39fa675e77b2af6a11bb4d86dd2 (diff)
downloadmv-593cccb16074fe9269dd2f278bd79859769eb1fd.tar.gz
mv-593cccb16074fe9269dd2f278bd79859769eb1fd.tar.bz2
mv-593cccb16074fe9269dd2f278bd79859769eb1fd.tar.xz
mv-593cccb16074fe9269dd2f278bd79859769eb1fd.zip
Improve constructors in some classes.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/xml.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp
index 4d434f46a..f25d867a6 100644
--- a/src/utils/xml.cpp
+++ b/src/utils/xml.cpp
@@ -90,12 +90,9 @@ namespace XML
}
}
- Document::Document(const char *const data, const int size)
+ Document::Document(const char *const data, const int size) :
+ mDoc(data ? xmlParseMemory(data, size) : nullptr)
{
- if (data)
- mDoc = xmlParseMemory(data, size);
- else
- mDoc = nullptr;
}
Document::~Document()