File: 0001_move-the-operator%3D%3D-definition-to-global-namespace.patch

package info (click to toggle)
maliit-framework 2.3.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,416 kB
  • sloc: cpp: 13,110; ansic: 2,506; xml: 299; sh: 34; makefile: 27; sed: 4
file content (37 lines) | stat: -rw-r--r-- 1,399 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
From 86e55980e3025678882cb9c4c78614f86cdc1f04 Mon Sep 17 00:00:00 2001
From: Rodney Dawes <dobey.pwns@gmail.com>
Date: Tue, 9 Aug 2022 13:57:39 -0400
Subject: [PATCH] ut_mimserveroptions: Move the operator== definition to global
 namespace

With gcc-12 having the operator== in anonymous namespace for a struct which
is in the global namespace results in a lengthy compilation error. Moving
this non-mmember function into the global namespace fixes the issue.

Fixes #112
---
 tests/ut_mimserveroptions/ut_mimserveroptions.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/ut_mimserveroptions/ut_mimserveroptions.cpp b/tests/ut_mimserveroptions/ut_mimserveroptions.cpp
index 7c904dbc..f533927b 100644
--- a/tests/ut_mimserveroptions/ut_mimserveroptions.cpp
+++ b/tests/ut_mimserveroptions/ut_mimserveroptions.cpp
@@ -42,12 +42,12 @@ namespace {
                           "-testability", "TESTABILITY", "-qdevel", "-reverse",
                           "-stylesheet", "-widgetcount", "-qdebug",
                           "-software" } };
+}
 
-    bool operator==(const MImServerCommonOptions &x,
-                    const MImServerCommonOptions &y)
-    {
-        return (x.showHelp == y.showHelp);
-    }
+bool operator==(const MImServerCommonOptions &x,
+                const MImServerCommonOptions &y)
+{
+    return (x.showHelp == y.showHelp);
 }