Correct explicit-constructor clang warning

This commit is contained in:
Ben RUBSON 2017-11-02 08:28:22 +01:00 committed by GitHub
parent a3d6b6f313
commit 6cb5078cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ class XmlNode : virtual public XmlValue {
const tinyxml2::XMLElement *element;
public:
XmlNode(const tinyxml2::XMLElement *element_)
explicit XmlNode(const tinyxml2::XMLElement *element_)
: XmlValue(safeValueForNode(element_)), element(element_) {}
~XmlNode() override = default;

View File

@ -48,8 +48,8 @@ class autosprintf {
/* Destructor: frees the temporarily allocated string. */
~autosprintf();
/* Conversion to string. */
operator char*() const;
operator std::string() const;
explicit operator char*() const;
explicit operator std::string() const;
/* Output to an ostream. */
friend inline std::ostream& operator<<(std::ostream& stream,
const autosprintf& tmp) {