summaryrefslogtreecommitdiffstats
path: root/src/XMLParser.h
diff options
context:
space:
mode:
authorp-mcgowan <mickeymcgowan@shaw.ca>2014-12-05 20:24:09 +0100
committerp-mcgowan <mickeymcgowan@shaw.ca>2014-12-05 20:24:09 +0100
commita8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d (patch)
tree8c1fa6af38d8997f0cc935b62362245373b5db86 /src/XMLParser.h
parentreformat (diff)
parentCheckBasicStyle: Check missing braces for control statements. (diff)
downloadcuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.gz
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.bz2
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.lz
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.xz
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.tar.zst
cuberite-a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d.zip
Diffstat (limited to 'src/XMLParser.h')
-rw-r--r--src/XMLParser.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/XMLParser.h b/src/XMLParser.h
index 5b53e55cf..ea341bce6 100644
--- a/src/XMLParser.h
+++ b/src/XMLParser.h
@@ -105,11 +105,11 @@ public:
Destroy ();
// If the encoding or seperator are empty, then nullptr
- if (pszEncoding != nullptr && pszEncoding [0] == 0)
+ if ((pszEncoding != nullptr) && (pszEncoding[0] == 0))
{
pszEncoding = nullptr;
}
- if (pszSep != nullptr && pszSep [0] == 0)
+ if ((pszSep != nullptr) && (pszSep[0] == 0))
{
pszSep = nullptr;
}
@@ -147,7 +147,7 @@ public:
bool Parse (const char *pszBuffer, int nLength, bool fIsFinal = true)
{
assert (m_p != nullptr);
- return XML_Parse (m_p, pszBuffer, nLength, fIsFinal) != 0;
+ return (XML_Parse (m_p, pszBuffer, nLength, fIsFinal) != 0);
}
// @cmember Parse internal buffer
@@ -254,7 +254,9 @@ protected:
XML_SetDefaultHandlerExpand (m_p, fEnable ? DefaultHandler : nullptr);
}
else
+ {
XML_SetDefaultHandler (m_p, fEnable ? DefaultHandler : nullptr);
+ }
}
// @cmember Enable/Disable external entity ref handler
@@ -402,11 +404,17 @@ public:
{
XML_expat_version v = XML_ExpatVersionInfo ();
if (pnMajor)
+ {
*pnMajor = v .major;
+ }
if (pnMinor)
+ {
*pnMinor = v .minor;
+ }
if (pnMicro)
+ {
*pnMicro = v .micro;
+ }
}
// @cmember Get last error string