summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibDeviceTree
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2022-10-21 15:53:20 +0200
committerAndrew Kaster <andrewdkaster@gmail.com>2022-11-06 10:25:08 -0700
commit4296425bd8f2212e70167118e5a76c4922565080 (patch)
tree5574318cc583989f1a3b3b96043a23b101d24b91 /Userland/Libraries/LibDeviceTree
parent4e406b07305007c84cef637f5753c196c34fac9c (diff)
downloadserenity-4296425bd8f2212e70167118e5a76c4922565080.zip
Everywhere: Remove redundant inequality comparison operators
C++20 can automatically synthesize `operator!=` from `operator==`, so there is no point in writing such functions by hand if all they do is call through to `operator==`. This fixes a compile error with compilers that implement P2468 (Clang 16 currently). This paper restores the C++17 behavior that if both `T::operator==(U)` and `T::operator!=(U)` exist, `U == T` won't be rewritten in reverse to call `T::operator==(U)`. Removing `!=` operators makes the rewriting possible again. See https://reviews.llvm.org/D134529#3853062
Diffstat (limited to 'Userland/Libraries/LibDeviceTree')
-rw-r--r--Userland/Libraries/LibDeviceTree/FlattenedDeviceTree.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/Userland/Libraries/LibDeviceTree/FlattenedDeviceTree.h b/Userland/Libraries/LibDeviceTree/FlattenedDeviceTree.h
index 75b23c6964..053dc73507 100644
--- a/Userland/Libraries/LibDeviceTree/FlattenedDeviceTree.h
+++ b/Userland/Libraries/LibDeviceTree/FlattenedDeviceTree.h
@@ -34,7 +34,6 @@ struct FlattenedDeviceTreeReserveEntry {
BigEndian<u64> size;
bool operator==(FlattenedDeviceTreeReserveEntry const& other) const { return other.address == address && other.size == size; }
- bool operator!=(FlattenedDeviceTreeReserveEntry const& other) const { return !(operator==(other)); }
};
static_assert(sizeof(FlattenedDeviceTreeReserveEntry) == 16, "FDT Memory Reservation entry size must match specification");