mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:27:44 +00:00
AK: Resolve clang-tidy warnings about unusual assignment operators
Either not returning *this, or in the case of Variant, not checking for self assignment. In AK::Atomic, we can't return *this due to the wrapper semantics Atomic implements.
This commit is contained in:
parent
22feb9d47b
commit
163367da39
3 changed files with 17 additions and 9 deletions
|
@ -138,7 +138,8 @@ public:
|
|||
template<typename U>
|
||||
constexpr Checked& operator=(U value)
|
||||
{
|
||||
return *this = Checked(value);
|
||||
*this = Checked(value);
|
||||
return *this;
|
||||
}
|
||||
|
||||
constexpr Checked& operator=(const Checked& other) = default;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue