Tue Jul 3 18:46:17 2012 UTC ()
Fix template definition to include all necessary parts.
Don't mix void and non-void in an expression.


(joerg)
diff -r1.11 -r1.12 pkgsrc/games/asc/distinfo
diff -r0 -r1.1 pkgsrc/games/asc/patches/patch-source_errors.h
diff -r0 -r1.1 pkgsrc/games/asc/patches/patch-source_gui.cpp
diff -r0 -r1.1 pkgsrc/games/asc/patches/patch-source_gui.h

cvs diff -r1.11 -r1.12 pkgsrc/games/asc/distinfo (expand / switch to unified diff)

--- pkgsrc/games/asc/distinfo 2011/12/03 20:17:47 1.11
+++ pkgsrc/games/asc/distinfo 2012/07/03 18:46:16 1.12
@@ -1,19 +1,22 @@ @@ -1,19 +1,22 @@
1$NetBSD: distinfo,v 1.11 2011/12/03 20:17:47 cheusov Exp $ 1$NetBSD: distinfo,v 1.12 2012/07/03 18:46:16 joerg Exp $
2 2
3SHA1 (asc/asc-source-1.16.4.0.tar.bz2) = 338081823943e08848325e6f2126e5c533517ae9 3SHA1 (asc/asc-source-1.16.4.0.tar.bz2) = 338081823943e08848325e6f2126e5c533517ae9
4RMD160 (asc/asc-source-1.16.4.0.tar.bz2) = a4de675628875cc36f30b39d1fb1ef3ac879e369 4RMD160 (asc/asc-source-1.16.4.0.tar.bz2) = a4de675628875cc36f30b39d1fb1ef3ac879e369
5Size (asc/asc-source-1.16.4.0.tar.bz2) = 11730677 bytes 5Size (asc/asc-source-1.16.4.0.tar.bz2) = 11730677 bytes
6SHA1 (asc/frontiers.mp3) = 7c6753fb5fe5e498fa780271da0a302c0619a1ca 6SHA1 (asc/frontiers.mp3) = 7c6753fb5fe5e498fa780271da0a302c0619a1ca
7RMD160 (asc/frontiers.mp3) = 4d2ec2ff647ef6ef66a2264465b86451bbba64f5 7RMD160 (asc/frontiers.mp3) = 4d2ec2ff647ef6ef66a2264465b86451bbba64f5
8Size (asc/frontiers.mp3) = 4407769 bytes 8Size (asc/frontiers.mp3) = 4407769 bytes
9SHA1 (asc/machine_wars.mp3) = d05e92b46ae0e90d9f3b38ce9c4b41bde599a02e 9SHA1 (asc/machine_wars.mp3) = d05e92b46ae0e90d9f3b38ce9c4b41bde599a02e
10RMD160 (asc/machine_wars.mp3) = 192b2a4f20676cd1ce3145df08997d9793ea373f 10RMD160 (asc/machine_wars.mp3) = 192b2a4f20676cd1ce3145df08997d9793ea373f
11Size (asc/machine_wars.mp3) = 2905989 bytes 11Size (asc/machine_wars.mp3) = 2905989 bytes
12SHA1 (asc/time_to_strike.mp3) = 76abf03155d9a21584f30c20370db0a93449c78a 12SHA1 (asc/time_to_strike.mp3) = 76abf03155d9a21584f30c20370db0a93449c78a
13RMD160 (asc/time_to_strike.mp3) = a402a00e490f7aca0871b52165d63f3bde3b3bff 13RMD160 (asc/time_to_strike.mp3) = a402a00e490f7aca0871b52165d63f3bde3b3bff
14Size (asc/time_to_strike.mp3) = 3242969 bytes 14Size (asc/time_to_strike.mp3) = 3242969 bytes
15SHA1 (patch-source_ASCStringHelpers.h) = 21caf558907c4eaafe88d714520b014a1c19f57b 15SHA1 (patch-source_ASCStringHelpers.h) = 21caf558907c4eaafe88d714520b014a1c19f57b
16SHA1 (patch-source_Property.cpp) = a8a8e154f8aa5a884cb9fe0e74c806dcaf3020b2 16SHA1 (patch-source_Property.cpp) = a8a8e154f8aa5a884cb9fe0e74c806dcaf3020b2
 17SHA1 (patch-source_errors.h) = 5d288a390984a5ab673609e3487feb5ab1ee6a8a
 18SHA1 (patch-source_gui.cpp) = 3611c053b08fa175bf89b79b9cd0a4d5202affc8
 19SHA1 (patch-source_gui.h) = 7e94c8fb53148da05177614fe79e9448693a54b8
17SHA1 (patch-source_password.cpp) = fa56110a045e111f772f09b9e9998d84a76e7d5a 20SHA1 (patch-source_password.cpp) = fa56110a045e111f772f09b9e9998d84a76e7d5a
18SHA1 (patch-source_strtmesg.cpp) = 3aa86f7e739983294a86c9ab5a8c0c4a6007c449 21SHA1 (patch-source_strtmesg.cpp) = 3aa86f7e739983294a86c9ab5a8c0c4a6007c449
19SHA1 (patch-source_tools_lib_errorout.cpp) = 9ccfa2d4447a3606fe72c9a60e79881fdfc1b080 22SHA1 (patch-source_tools_lib_errorout.cpp) = 9ccfa2d4447a3606fe72c9a60e79881fdfc1b080

File Added: pkgsrc/games/asc/patches/Attic/patch-source_errors.h
$NetBSD: patch-source_errors.h,v 1.1 2012/07/03 18:46:16 joerg Exp $

--- source/errors.h.orig	2006-05-13 13:05:00.000000000 +0000
+++ source/errors.h
@@ -73,7 +73,7 @@
         AssertionException ( const ASCString& check, const ASCString& file, int line ) : ASCmsgException ( ASCString("Assertion failed: ") + check + " at " + file + ":" + ASCString::toString(line)  ) {};
   };
 
-#define assertOrThrow(expr)  (static_cast<void> ( (expr) ? 0 : (throw AssertionException (#expr, __FILE__, __LINE__))))
+#define assertOrThrow(expr)  do { if (expr) {} else throw AssertionException (#expr, __FILE__, __LINE__); } while (0)
   
   
 

File Added: pkgsrc/games/asc/patches/Attic/patch-source_gui.cpp
$NetBSD: patch-source_gui.cpp,v 1.1 2012/07/03 18:46:16 joerg Exp $

--- source/gui.cpp.orig	2012-07-03 10:55:47.000000000 +0000
+++ source/gui.cpp
@@ -153,16 +153,6 @@ void   GuiHost<T>::returncoordinates ( v
    }
 }
 
-template<class T> 
-void   GuiHost<T>::chainiconstohost ( T icn )
-{
-   if ( icn ) {
-      setfirsticon( (T) icn->frst() );
-      getfirsticon()->sethost ( this );
-   }
-}
-
-
 template<class T>
 void   GuiHost<T>::savebackground ( void )
 {

File Added: pkgsrc/games/asc/patches/Attic/patch-source_gui.h
$NetBSD: patch-source_gui.h,v 1.1 2012/07/03 18:46:16 joerg Exp $

--- source/gui.h.orig	2012-07-03 10:55:50.000000000 +0000
+++ source/gui.h
@@ -221,7 +221,12 @@ class GuiHost : public BasicGuiHost {
         void   savebackground ( void );
         virtual int    painticons ( void );
         virtual void   paintsmallicons ( int taste, int up );
-        void   chainiconstohost ( T icn );
+        void   chainiconstohost ( T icn ) {
+          if ( icn ) {
+             setfirsticon( (T) icn->frst() );
+             getfirsticon()->sethost ( this );
+          }
+        }
         void   runpressedmouse ( int taste );
         void   cleanup ( void ) ;    // wird zum entfernen der kleinen guiicons aufgerufen, bevor das icon ausgefhrt wird
         virtual void   restorebackground ( void );