Skip to content

Commit

Permalink
clang-tidy: add missing explicit
Browse files Browse the repository at this point in the history
Found with google-explicit-constructor

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb authored and piponazo committed May 19, 2021
1 parent ff39473 commit 8dbc699
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion samples/Jzon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace Jzon
{
SetFormat(NoFormat);
}
FormatInterpreter(const Format &format)
explicit FormatInterpreter(const Format &format)
{
SetFormat(format);
}
Expand Down
2 changes: 1 addition & 1 deletion src/basicio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace Exiv2 {
class FileIo::Impl {
public:
//! Constructor
Impl(std::string path);
explicit Impl(std::string path);
#ifdef EXV_UNICODE_PATH
//! Constructor accepting a unicode path in an std::wstring
Impl(const std::wstring& wpath);
Expand Down
4 changes: 3 additions & 1 deletion src/exif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ namespace {
class FindExifdatumByKey {
public:
//! Constructor, initializes the object with the key to look for
FindExifdatumByKey(const std::string& key) : key_(key) {}
explicit FindExifdatumByKey(const std::string& key) : key_(key)
{
}
/*!
@brief Returns true if the key of \em exifdatum is equal
to that of the object.
Expand Down
5 changes: 3 additions & 2 deletions src/xmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ namespace {
class FindXmpdatum {
public:
//! Constructor, initializes the object with key
FindXmpdatum(const Exiv2::XmpKey& key)
: key_(key.key()) {}
explicit FindXmpdatum(const Exiv2::XmpKey& key) : key_(key.key())
{
}
/*!
@brief Returns true if prefix and property of the argument
Xmpdatum are equal to that of the object.
Expand Down

0 comments on commit 8dbc699

Please sign in to comment.