pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/crimsonfields Fix ODR violation that results in ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ba48a9f77861
branches:  trunk
changeset: 610815:ba48a9f77861
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Nov 07 15:24:39 2012 +0000

description:
Fix ODR violation that results in clang not emitting the vtable for
Path, if the inline function isn't emitted separately due to
optimisations.

diffstat:

 games/crimsonfields/distinfo                      |   3 ++-
 games/crimsonfields/patches/patch-src_cf_path.cpp |  15 +++++++++++++++
 2 files changed, 17 insertions(+), 1 deletions(-)

diffs (30 lines):

diff -r 0d17c20d098d -r ba48a9f77861 games/crimsonfields/distinfo
--- a/games/crimsonfields/distinfo      Wed Nov 07 15:23:37 2012 +0000
+++ b/games/crimsonfields/distinfo      Wed Nov 07 15:24:39 2012 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.17 2008/04/24 21:26:49 wiz Exp $
+$NetBSD: distinfo,v 1.18 2012/11/07 15:24:39 joerg Exp $
 
 SHA1 (crimson-0.5.2.tar.bz2) = c772f9c0bb34ac47251c7aaf8f4e55a49df463f0
 RMD160 (crimson-0.5.2.tar.bz2) = a78df45718a76476b063a46e3d7a3d623d4cf07b
 Size (crimson-0.5.2.tar.bz2) = 858371 bytes
+SHA1 (patch-src_cf_path.cpp) = c4f8efb3c7e6f70af94b5bfd468a070003914322
diff -r 0d17c20d098d -r ba48a9f77861 games/crimsonfields/patches/patch-src_cf_path.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/crimsonfields/patches/patch-src_cf_path.cpp Wed Nov 07 15:24:39 2012 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_cf_path.cpp,v 1.1 2012/11/07 15:24:39 joerg Exp $
+
+The inline violates the ODR rule for Path.
+
+--- src/cf/path.cpp.orig       2012-11-05 17:03:05.000000000 +0000
++++ src/cf/path.cpp
+@@ -212,7 +212,7 @@ short Path::Find( const Unit *u, const P
+ // RETURNS    : estimated cost to destination
+ ////////////////////////////////////////////////////////////////////////
+ 
+-inline unsigned short Path::ETA( const Point &p ) const {
++unsigned short Path::ETA( const Point &p ) const {
+   return Distance( p, end ) * quality;
+ }
+ 



Home | Main Index | Thread Index | Old Index