1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-09 09:34:57 +09: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:
Andrew Kaster 2021-10-31 14:52:26 -06:00 committed by Andreas Kling
parent 22feb9d47b
commit 163367da39
Notes: sideshowbarker 2024-07-18 01:08:05 +09:00
3 changed files with 17 additions and 9 deletions

View file

@ -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;