mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: fix clang-tidy warnings (#38079)
* chore: fix clang-tidy warnings * refactor: avoid need for NOLINTNEXTLINE
This commit is contained in:
@@ -21,7 +21,7 @@ class IDUserData : public base::SupportsUserData::Data {
|
||||
public:
|
||||
explicit IDUserData(int32_t id) : id_(id) {}
|
||||
|
||||
operator int32_t() const { return id_; }
|
||||
explicit operator int32_t() const { return id_; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
@@ -58,7 +58,7 @@ int32_t TrackableObjectBase::GetIDFromWrappedClass(
|
||||
auto* id =
|
||||
static_cast<IDUserData*>(wrapped->GetUserData(kTrackedObjectKey));
|
||||
if (id)
|
||||
return *id;
|
||||
return int32_t(*id);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class ShowItemHelper {
|
||||
return *instance;
|
||||
}
|
||||
|
||||
ShowItemHelper() {}
|
||||
ShowItemHelper() = default;
|
||||
|
||||
ShowItemHelper(const ShowItemHelper&) = delete;
|
||||
ShowItemHelper& operator=(const ShowItemHelper&) = delete;
|
||||
|
||||
Reference in New Issue
Block a user