[sword-devel] cvs broken - listkey

Daniel Glassey sword-devel@crosswire.org
Wed, 11 Sep 2002 11:15:50 +0100


g++ -DUSE_AUTOTOOLS -DGLOBCONFPATH=\"/usr/local/etc/sword.conf\" -DUNIX -I. -I. -I.. -
I../include -g -O2 -ftemplate-depth-25 -c ../src/keys/listkey.cpp -MT listkey.lo -MD -MP -MF 
.deps/listkey.TPlo  -fPIC -DPIC
../src/keys/listkey.cpp: In method `const char *ListKey::getText ()
const':
../src/keys/listkey.cpp:286: passing `const ListKey' as `this' argument
of `SWKey *ListKey::GetElement (int = -1)' discards qualifiers
make[2]: *** [listkey.lo] Error 1
make[2]: Leaving directory `..../src/sword/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `..../src/sword'
make: *** [all] Error 2
[sword]$

The problem here is that ListKey::getText is a const member function and it is calling 
ListKey::GetElement which is not const.
If ListKey::GetElement is made const it isn't allowed to modify error so that would need to be 
changed.
or if ListKey::getText is to be made non-const then lots of other things need changed.

erm, which is it to be?
Daniel