﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
41	small fix needed to build against wx2.9	Wookey	Olly Betts	"building against wx2.9 (on debian testing=wheezy) fails in namecompare.cc:

LL -D__WXGTK__ -pthread -Wall -Wunused -Wshadow -Wpointer-arith      -Wwrite-strings -Wcast-align -g -O2 -c -o aven-namecompare.o `test -f 'namecompare.cc' || echo './'`namecompare.cc
namecompare.cc: In function ‘int name_cmp(const wxString&, const wxString&, int)’:
namecompare.cc:33:41: error: operands to ?: have different types ‘int’ and ‘wxUniChar’
namecompare.cc:34:41: error: operands to ?: have different types ‘int’ and ‘wxUniChar’


This simple patch fixes it:
Index: survex-1.2.6/src/namecompare.cc
===================================================================
--- survex-1.2.6.orig/src/namecompare.cc        2013-04-09 01:30:08.000000000 +0100
+++ survex-1.2.6/src/namecompare.cc     2013-04-09 01:31:39.844104393 +0100
@@ -30,8 +30,8 @@
 int name_cmp(const wxString &a, const wxString &b, int separator) {
    size_t i = 0;
    while (1) {
-      int cha = (i == a.size() ? 0 : a[i]);
-      int chb = (i == b.size() ? 0 : b[i]);
+      int cha = (i == a.size() ? 0 : (int) a[i]);
+      int chb = (i == b.size() ? 0 : (int) b[i]);

       /* done if end of either string */
       if (!cha || !chb) return cha - chb;


It may be that there is a better fix but this does the basic job. "	defect	closed	blocker	1.2.7	aven		fixed		
