summaryrefslogtreecommitdiff
path: root/games/knights
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-06-21 14:20:37 +0000
committerjoerg <joerg@pkgsrc.org>2006-06-21 14:20:37 +0000
commit43da6cac0a40ea78f2bf5a7c7a4da688c883dd9f (patch)
tree7b962127bd1fd82590b4cc7a84139d0d53eba6a0 /games/knights
parentc0b92b7ce22066da528d2a9571204b85af60fa0e (diff)
downloadpkgsrc-43da6cac0a40ea78f2bf5a7c7a4da688c883dd9f.tar.gz
Replace lvalue casts with proper dynamic casts.
Diffstat (limited to 'games/knights')
-rw-r--r--games/knights/distinfo3
-rw-r--r--games/knights/patches/patch-aa28
2 files changed, 30 insertions, 1 deletions
diff --git a/games/knights/distinfo b/games/knights/distinfo
index dcadf45df70..f67112a26b5 100644
--- a/games/knights/distinfo
+++ b/games/knights/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 23:11:59 agc Exp $
+$NetBSD: distinfo,v 1.4 2006/06/21 14:20:37 joerg Exp $
SHA1 (knights-0.6.tar.gz) = 54cbed6c3e0ab9d62840ad75ed8e6cf874fa7f61
RMD160 (knights-0.6.tar.gz) = 3974312d834a63a7cfe53762346b64952763732c
Size (knights-0.6.tar.gz) = 1317589 bytes
+SHA1 (patch-aa) = fb48569f22c081254e48ced8634375a6e1769e41
diff --git a/games/knights/patches/patch-aa b/games/knights/patches/patch-aa
new file mode 100644
index 00000000000..da4647fc112
--- /dev/null
+++ b/games/knights/patches/patch-aa
@@ -0,0 +1,28 @@
+$NetBSD: patch-aa,v 1.3 2006/06/21 14:20:37 joerg Exp $
+
+--- knights/core.cpp.orig 2006-06-21 13:24:01.000000000 +0000
++++ knights/core.cpp
+@@ -90,7 +90,7 @@ void core::createNewIO( int type, int ID
+ else
+ {
+ /* Use an existing internetIO */
+- (io_base*)internetioPtr = myIOMap.find(Null);
++ internetioPtr = dynamic_cast<io_internet *>(myIOMap.find(Null));
+ if( internetioPtr == NULL )
+ {
+ kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;
+@@ -114,12 +114,12 @@ void core::createNewIO( int type, int ID
+ }
+ else
+ {
+- (io_base*)internetioPtr = myIOMap.find(ID);
++ internetioPtr = dynamic_cast<io_internet *>(myIOMap.find(ID));
+ if( internetioPtr == NULL )
+ {
+ /* no io mapped to the ID yet, use the internetio */
+ /* Use an existing internetIO */
+- (io_base*)internetioPtr = myIOMap.find(Null);
++ internetioPtr = dynamic_cast<io_internet *>(myIOMap.find(Null));
+ if( internetioPtr == NULL )
+ {
+ kdWarning() << "core::createNewIO: Trying to connect a match to an internetIO that doesn't exsist." << endl;