tag 667389 patch
thanks

Matthias Klose <[email protected]> (03/04/2012):
> Package: tagua
> Version: 1.0~alpha2-9
> Severity: important
> Tags: sid wheezy
> User: [email protected]
> Usertags: ftbfs-gcc-4.7

Here's a patch to fix this FTBFS. No intent to NMU here.

Mraw,
KiBi.
diff -u tagua-1.0~alpha2/debian/changelog tagua-1.0~alpha2/debian/changelog
--- tagua-1.0~alpha2/debian/changelog
+++ tagua-1.0~alpha2/debian/changelog
@@ -1,3 +1,10 @@
+tagua (1.0~alpha2-9.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS with gcc 4.7 by using “this->” where needed (Closes: #667389).
+
+ -- Cyril Brulebois <[email protected]>  Wed, 04 Apr 2012 19:18:04 +0000
+
 tagua (1.0~alpha2-9) unstable; urgency=low
 
   * Fixed build on at least amd64 (Pino Toscano, Closes: #582991).
diff -u tagua-1.0~alpha2/src/hlvariant/crazyhouse/movegenerator.h tagua-1.0~alpha2/src/hlvariant/crazyhouse/movegenerator.h
--- tagua-1.0~alpha2/src/hlvariant/crazyhouse/movegenerator.h
+++ tagua-1.0~alpha2/src/hlvariant/crazyhouse/movegenerator.h
@@ -49,7 +49,7 @@
     for (int j = 0; j < m_state.board().size().y; j++) {
       Point p(i, j);
       for (int k = 0; k < n; k++) {
-        addMove(Move(m_state.turn(), k, p), callback);
+        this->addMove(Move(m_state.turn(), k, p), callback);
       }
     }
   }
only in patch2:
unchanged:
--- tagua-1.0~alpha2.orig/src/hlvariant/sho-shogi/legalitycheck.h
+++ tagua-1.0~alpha2/src/hlvariant/sho-shogi/legalitycheck.h
@@ -44,7 +44,7 @@
 
 template <typename GameState>
 bool LegalityCheck<GameState>::legal(Move& move) const {
-  if (!pseudolegal(move))
+  if (!this->pseudolegal(move))
     return false;
 
   GameState tmp(Base::m_state);
@@ -55,9 +55,9 @@
   Point prince_pos = tmp.board().find(Piece(Base::m_state.turn(), Piece::DRUNKEN_ELEPHANT, true));
 
   // check if the king and prince can be captured
-  if ((canBeCaptured(tmp, king_pos) && canBeCaptured(tmp, prince_pos)) ||
-      (canBeCaptured(tmp, king_pos) && !prince_pos.valid()) ||
-      (canBeCaptured(tmp, prince_pos) && !king_pos.valid()) ||
+  if ((this->canBeCaptured(tmp, king_pos) && this->canBeCaptured(tmp, prince_pos)) ||
+      (this->canBeCaptured(tmp, king_pos) && !prince_pos.valid()) ||
+      (this->canBeCaptured(tmp, prince_pos) && !king_pos.valid()) ||
       (!prince_pos.valid() && !king_pos.valid()))
     return false;
 
only in patch2:
unchanged:
--- tagua-1.0~alpha2.orig/src/hlvariant/crazyhouse/serializer.h
+++ tagua-1.0~alpha2/src/hlvariant/crazyhouse/serializer.h
@@ -46,10 +46,10 @@
     res = "{" + move.drop().typeName() + '}';
   }
   else {
-    res = symbol(move.drop().type()).toUpper();
+    res = this->symbol(move.drop().type()).toUpper();
   }
   
-  return res + '@' + move.to().toString(ref.board().size().y) + suffix(move, ref);
+  return res + '@' + move.to().toString(ref.board().size().y) + this->suffix(move, ref);
 }
 
 

Attachment: signature.asc
Description: Digital signature

Reply via email to