From b5b09e3b3a825814709b8af7ec2f8facc8c608d4 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 3 Jul 2012 18:46:16 +0000 Subject: Fix template definition to include all necessary parts. Don't mix void and non-void in an expression. --- games/asc/distinfo | 5 ++++- games/asc/patches/patch-source_errors.h | 13 +++++++++++++ games/asc/patches/patch-source_gui.cpp | 21 +++++++++++++++++++++ games/asc/patches/patch-source_gui.h | 18 ++++++++++++++++++ 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 games/asc/patches/patch-source_errors.h create mode 100644 games/asc/patches/patch-source_gui.cpp create mode 100644 games/asc/patches/patch-source_gui.h (limited to 'games') diff --git a/games/asc/distinfo b/games/asc/distinfo index 84766170f7f..c024d82fdbf 100644 --- a/games/asc/distinfo +++ b/games/asc/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.11 2011/12/03 20:17:47 cheusov Exp $ +$NetBSD: distinfo,v 1.12 2012/07/03 18:46:16 joerg Exp $ SHA1 (asc/asc-source-1.16.4.0.tar.bz2) = 338081823943e08848325e6f2126e5c533517ae9 RMD160 (asc/asc-source-1.16.4.0.tar.bz2) = a4de675628875cc36f30b39d1fb1ef3ac879e369 @@ -14,6 +14,9 @@ RMD160 (asc/time_to_strike.mp3) = a402a00e490f7aca0871b52165d63f3bde3b3bff Size (asc/time_to_strike.mp3) = 3242969 bytes SHA1 (patch-source_ASCStringHelpers.h) = 21caf558907c4eaafe88d714520b014a1c19f57b SHA1 (patch-source_Property.cpp) = a8a8e154f8aa5a884cb9fe0e74c806dcaf3020b2 +SHA1 (patch-source_errors.h) = 5d288a390984a5ab673609e3487feb5ab1ee6a8a +SHA1 (patch-source_gui.cpp) = 3611c053b08fa175bf89b79b9cd0a4d5202affc8 +SHA1 (patch-source_gui.h) = 7e94c8fb53148da05177614fe79e9448693a54b8 SHA1 (patch-source_password.cpp) = fa56110a045e111f772f09b9e9998d84a76e7d5a SHA1 (patch-source_strtmesg.cpp) = 3aa86f7e739983294a86c9ab5a8c0c4a6007c449 SHA1 (patch-source_tools_lib_errorout.cpp) = 9ccfa2d4447a3606fe72c9a60e79881fdfc1b080 diff --git a/games/asc/patches/patch-source_errors.h b/games/asc/patches/patch-source_errors.h new file mode 100644 index 00000000000..87117a86b2c --- /dev/null +++ b/games/asc/patches/patch-source_errors.h @@ -0,0 +1,13 @@ +$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 ( (expr) ? 0 : (throw AssertionException (#expr, __FILE__, __LINE__)))) ++#define assertOrThrow(expr) do { if (expr) {} else throw AssertionException (#expr, __FILE__, __LINE__); } while (0) + + + diff --git a/games/asc/patches/patch-source_gui.cpp b/games/asc/patches/patch-source_gui.cpp new file mode 100644 index 00000000000..19915cace38 --- /dev/null +++ b/games/asc/patches/patch-source_gui.cpp @@ -0,0 +1,21 @@ +$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::returncoordinates ( v + } + } + +-template +-void GuiHost::chainiconstohost ( T icn ) +-{ +- if ( icn ) { +- setfirsticon( (T) icn->frst() ); +- getfirsticon()->sethost ( this ); +- } +-} +- +- + template + void GuiHost::savebackground ( void ) + { diff --git a/games/asc/patches/patch-source_gui.h b/games/asc/patches/patch-source_gui.h new file mode 100644 index 00000000000..95ea7b786f6 --- /dev/null +++ b/games/asc/patches/patch-source_gui.h @@ -0,0 +1,18 @@ +$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 ); -- cgit v1.2.3