lib/expat/ExpatParser: make constructors "explicit"

This commit is contained in:
Max Kellermann 2017-01-07 16:15:11 +01:00
parent 5163b1a624
commit 8986d14e98
1 changed files with 3 additions and 3 deletions

View File

@ -31,10 +31,10 @@ class InputStream;
class ExpatError final : public std::runtime_error {
public:
ExpatError(XML_Error code)
explicit ExpatError(XML_Error code)
:std::runtime_error(XML_ErrorString(code)) {}
ExpatError(XML_Parser parser)
explicit ExpatError(XML_Parser parser)
:ExpatError(XML_GetErrorCode(parser)) {}
};
@ -42,7 +42,7 @@ class ExpatParser final {
const XML_Parser parser;
public:
ExpatParser(void *userData)
explicit ExpatParser(void *userData)
:parser(XML_ParserCreate(nullptr)) {
XML_SetUserData(parser, userData);
}