Skip to content

Commit

Permalink
Correct explicit-constructor clang warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben RUBSON authored Nov 2, 2017
1 parent a3d6b6f commit 6cb5078
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion encfs/XmlReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions encfs/autosprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6cb5078

Please sign in to comment.