[lld-macho][nfc] Clean up some constructor declarations

Remove unnecessary default ctor + add `explicit` to others
This commit is contained in:
Jez Ng 2021-04-21 22:09:48 -04:00
parent beb5ac8b25
commit 2618eaf614
2 changed files with 3 additions and 5 deletions

View File

@ -1050,8 +1050,8 @@ BitcodeBundleSection::BitcodeBundleSection()
class ErrorCodeWrapper {
public:
ErrorCodeWrapper(std::error_code ec) : errorCode(ec.value()) {}
ErrorCodeWrapper(int ec) : errorCode(ec) {}
explicit ErrorCodeWrapper(std::error_code ec) : errorCode(ec.value()) {}
explicit ErrorCodeWrapper(int ec) : errorCode(ec) {}
operator int() const { return errorCode; }
private:

View File

@ -337,7 +337,7 @@ private:
class LCRPath : public LoadCommand {
public:
LCRPath(StringRef path) : path(path) {}
explicit LCRPath(StringRef path) : path(path) {}
uint32_t getSize() const override {
return alignTo(sizeof(rpath_command) + path.size() + 1, target->wordSize);
@ -473,8 +473,6 @@ public:
template <class LP> class LCEncryptionInfo : public LoadCommand {
public:
LCEncryptionInfo() {}
uint32_t getSize() const override {
return sizeof(typename LP::encryption_info_command);
}