Skip to content

Commit 85393d3

Browse files
committed
clang-tidy: use explicit constructors
Found with google-explicit-constructor Signed-off-by: Rosen Penev <[email protected]>
1 parent ddd28fe commit 85393d3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/patchelf.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ class ElfFile
118118
std::vector<SectionName> sectionsByOldIndex;
119119

120120
public:
121-
122-
ElfFile(FileContents fileContents);
121+
explicit ElfFile(FileContents fileContents);
123122

124123
bool isChanged()
125124
{
@@ -289,7 +288,7 @@ std::string fmt(Args... args)
289288
struct SysError : std::runtime_error
290289
{
291290
int errNo;
292-
SysError(const std::string & msg)
291+
explicit SysError(const std::string & msg)
293292
: std::runtime_error(fmt(msg + ": " + strerror(errno)))
294293
, errNo(errno)
295294
{ }

0 commit comments

Comments
 (0)