clang-tidy: add missing explicit

Found with google-explicit-constructor

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-05-18 18:12:33 -07:00 committed by Luis Díaz Más
parent ff39473c18
commit 8dbc699858
4 changed files with 8 additions and 5 deletions

View File

@ -41,7 +41,7 @@ namespace Jzon
{
SetFormat(NoFormat);
}
FormatInterpreter(const Format &format)
explicit FormatInterpreter(const Format &format)
{
SetFormat(format);
}

View File

@ -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);

View File

@ -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.

View File

@ -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.