summaryrefslogtreecommitdiff
path: root/games/xmahjongg/patches/patch-ac
blob: 6c189076093f38dc8793ece3f170da5162dbe1f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-ac,v 1.2 2006/11/09 13:45:33 martin Exp $

SunPro sees an overloading ambiguity between operator bool() and
operator const char *(). ISO C++ and gcc 4.2 agree.

--- permstr.cc.orig	2001-09-06 20:30:10.000000000 +0200
+++ permstr.cc	2006-11-09 14:35:55.000000000 +0100
@@ -183,8 +183,8 @@
 bool
 operator==(PermString a, const char *b)
 {
-  if (!a || !b)
-    return !a && !b;
+  if (operator==(a, false) || !b)
+    return (operator==(a, false)) && !b;
   int l = strlen(b);
   return a.length() == l && memcmp(a.cc(), b, l) == 0;
 }