Skip to content

Commit cf2e7b3

Browse files
committed
mitigated misc-explicit-constructor clang-tidy warnings
1 parent a1711a3 commit cf2e7b3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

simplecpp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ namespace simplecpp {
16991699
};
17001700

17011701
struct invalidDirectiveAsMacroParameter : public Error {
1702-
invalidDirectiveAsMacroParameter(const Location &loc)
1702+
explicit invalidDirectiveAsMacroParameter(const Location &loc)
17031703
: Error(loc, "it is invalid to use a preprocessor directive as macro parameter") {}
17041704
};
17051705

simplecpp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ namespace simplecpp {
8484
struct View
8585
{
8686
// cppcheck-suppress noExplicitConstructor
87+
// NOLINTNEXTLINE(misc-explicit-constructor)
8788
View(const char* data)
8889
: mData(data)
8990
, mSize(strlen(data))
@@ -97,6 +98,7 @@ namespace simplecpp {
9798
{}
9899

99100
// cppcheck-suppress noExplicitConstructor
101+
// NOLINTNEXTLINE(misc-explicit-constructor)
100102
View(const std::string& str)
101103
: mData(str.data())
102104
, mSize(str.size())

0 commit comments

Comments
 (0)