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:
parent
22feb9d47b
commit
163367da39
Notes:
sideshowbarker
2024-07-18 01:08:05 +09:00
Author: https://github.com/ADKaster
Commit: 163367da39
Pull-request: https://github.com/SerenityOS/serenity/pull/10737
Reviewed-by: https://github.com/BenWiederhake
Reviewed-by: https://github.com/PeterBindels-TomTom
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/dascandy
Reviewed-by: https://github.com/trflynn89
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