diff options
author | p-mcgowan <mickeymcgowan@shaw.ca> | 2014-12-05 20:24:09 +0100 |
---|---|---|
committer | p-mcgowan <mickeymcgowan@shaw.ca> | 2014-12-05 20:24:09 +0100 |
commit | a8bbd5efe422dd20a6bdcfc18cd0befbfeb93f9d (patch) | |
tree | 8c1fa6af38d8997f0cc935b62362245373b5db86 /src/XMLParser.h | |
parent | reformat (diff) | |
parent | CheckBasicStyle: Check missing braces for control statements. (diff) | |
download | cuberite-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.h | 14 |
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 |