summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2023-03-26 12:08:36 -0600
committerLinus Groh <mail@linusgroh.de>2023-03-28 09:18:50 +0100
commit4a70fa052ff8aa34ceee50608cae54c00fd7ef3c (patch)
treefff2deca5c364309fab218443b36e953c1bcd6e6 /Userland/Libraries
parent840afbb55f70cf2d3bbbca63b4d161174e2de7ad (diff)
downloadserenity-4a70fa052ff8aa34ceee50608cae54c00fd7ef3c.zip
LibWeb: Declare defaulted style value comparision operators inline
Some versions of clang, such as Apple clang-1400.0.29.202 error out on the previous out of line operators. Explicitly defaulting comparison operators out of line is allowed per P2085R0, but was checked in clang before version 15 in C++20 mode.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.h2
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp2
-rw-r--r--Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h2
4 files changed, 2 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.cpp
index 17d6be591a..5a476a21f8 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.cpp
@@ -19,6 +19,4 @@ ErrorOr<String> ContentStyleValue::to_string() const
return m_properties.content->to_string();
}
-bool ContentStyleValue::Properties::operator==(ContentStyleValue::Properties const&) const = default;
-
}
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.h
index 761fa5501d..c628c0b0ee 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/ContentStyleValue.h
@@ -39,7 +39,7 @@ private:
struct Properties {
ValueComparingNonnullRefPtr<StyleValueList> content;
ValueComparingRefPtr<StyleValueList> alt_text;
- bool operator==(Properties const&) const;
+ bool operator==(Properties const&) const = default;
} m_properties;
};
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp
index 4b5ad35bc0..863067a51c 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.cpp
@@ -40,6 +40,4 @@ ErrorOr<String> GridAreaShorthandStyleValue::to_string() const
return builder.to_string();
}
-bool GridAreaShorthandStyleValue::Properties::operator==(GridAreaShorthandStyleValue::Properties const&) const = default;
-
}
diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h
index 7d5e59d237..9f63da82ff 100644
--- a/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h
+++ b/Userland/Libraries/LibWeb/CSS/StyleValues/GridAreaShorthandStyleValue.h
@@ -44,7 +44,7 @@ private:
ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue const> column_start;
ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue const> row_end;
ValueComparingNonnullRefPtr<GridTrackPlacementStyleValue const> column_end;
- bool operator==(Properties const&) const;
+ bool operator==(Properties const&) const = default;
} m_properties;
};