Title: [288613] trunk/Tools
Revision
288613
Author
commit-qu...@webkit.org
Date
2022-01-26 04:18:57 -0800 (Wed, 26 Jan 2022)

Log Message

[GTK] C++20 warnings in TestConsoleMessage
https://bugs.webkit.org/show_bug.cgi?id=235634

Patch by Philippe Normand <pnorm...@igalia.com> on 2022-01-26
Reviewed by Adrian Perez de Castro.

Fix ambiguous-reversed-operator warnings. In C++20 comparison operators (like a == b) need
to be declared const, so that reverse comparisons (like b == a) also work as intended.

* TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:
(ConsoleMessageTest::ConsoleMessage::operator== const):
(ConsoleMessageTest::ConsoleMessage::operator==): Deleted.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (288612 => 288613)


--- trunk/Tools/ChangeLog	2022-01-26 10:24:32 UTC (rev 288612)
+++ trunk/Tools/ChangeLog	2022-01-26 12:18:57 UTC (rev 288613)
@@ -1,3 +1,17 @@
+2022-01-26  Philippe Normand  <pnorm...@igalia.com>
+
+        [GTK] C++20 warnings in TestConsoleMessage
+        https://bugs.webkit.org/show_bug.cgi?id=235634
+
+        Reviewed by Adrian Perez de Castro.
+
+        Fix ambiguous-reversed-operator warnings. In C++20 comparison operators (like a == b) need
+        to be declared const, so that reverse comparisons (like b == a) also work as intended.
+
+        * TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:
+        (ConsoleMessageTest::ConsoleMessage::operator== const):
+        (ConsoleMessageTest::ConsoleMessage::operator==): Deleted.
+
 2022-01-26  Alexander Mikhaylenko  <al...@gnome.org>
 
         [GTK] REGRESSION: Touch scrolling is broken

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp (288612 => 288613)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp	2022-01-26 10:24:32 UTC (rev 288612)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp	2022-01-26 12:18:57 UTC (rev 288613)
@@ -29,7 +29,7 @@
     enum class MessageSource { _javascript_, Network, ConsoleAPI, Security, Other };
     enum class MessageLevel { Info, Log, Warning, Error, Debug };
     struct ConsoleMessage {
-        bool operator==(const ConsoleMessage& other)
+        bool operator==(const ConsoleMessage& other) const
         {
             return source == other.source
                 && level == other.level
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to