forked from OSchip/llvm-project
[lld-macho][nfc] Clean up some constructor declarations
Remove unnecessary default ctor + add `explicit` to others
This commit is contained in:
parent
beb5ac8b25
commit
2618eaf614
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue