[sword-svn] r2264 - trunk/src/keys
scribe at crosswire.org
scribe at crosswire.org
Mon Feb 16 22:02:44 MST 2009
Author: scribe
Date: 2009-02-16 22:02:44 -0700 (Mon, 16 Feb 2009)
New Revision: 2264
Modified:
trunk/src/keys/versekey.cpp
Log:
Fixed a 32-bit bug
Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp 2009-02-17 02:31:04 UTC (rev 2263)
+++ trunk/src/keys/versekey.cpp 2009-02-17 05:02:44 UTC (rev 2264)
@@ -1618,8 +1618,8 @@
int VerseKey::_compare(const VerseKey &ivkey)
{
- long keyval1 = 0;
- long keyval2 = 0;
+ unsigned long keyval1 = 0;
+ unsigned long keyval2 = 0;
keyval1 += Testament() * 1000000000;
keyval2 += ivkey.Testament() * 1000000000;
@@ -1631,8 +1631,7 @@
keyval2 += ivkey.Verse() * 50;
keyval1 += (int)getSuffix();
keyval2 += (int)ivkey.getSuffix();
- keyval1 -= keyval2;
- keyval1 = (keyval1) ? ((keyval1 > 0) ? 1 : -1) /*keyval1/labs(keyval1)*/:0; // -1 | 0 | 1
+ keyval1 = (keyval1 != keyval2) ? ((keyval1 > keyval2) ? 1 : -1) : 0; // -1 | 0 | 1
return keyval1;
}
More information about the sword-cvs
mailing list