[sword-svn] r2004 - trunk/include

dglassey at www.crosswire.org dglassey at www.crosswire.org
Sat Nov 25 08:42:25 MST 2006


Author: dglassey
Date: 2006-11-25 08:42:25 -0700 (Sat, 25 Nov 2006)
New Revision: 2004

Modified:
   trunk/include/swbuf.h
Log:
unsigned comparison warning in endsWith


Modified: trunk/include/swbuf.h
===================================================================
--- trunk/include/swbuf.h	2006-11-25 15:34:22 UTC (rev 2003)
+++ trunk/include/swbuf.h	2006-11-25 15:42:25 UTC (rev 2004)
@@ -344,7 +344,7 @@
 	inline bool operator >=(const SWBuf &other) const { return compare(other) >= 0; }
 
 	inline bool startsWith(const char *prefix) const { return !strncmp(c_str(), prefix, strlen(prefix)); }
-	inline bool endsWith(const char *postfix) const { int psize = strlen(postfix); return (size() >= psize)?!strncmp(end-psize, postfix, psize):false; }
+	inline bool endsWith(const char *postfix) const { unsigned int psize = strlen(postfix); return (size() >= psize)?!strncmp(end-psize, postfix, psize):false; }
 	inline int compare(const char *other) const { return strcmp(c_str(), other); }
 	inline bool operator ==(const char *other) const { return !compare(other); }
 	inline bool operator !=(const char *other) const { return compare(other); }




More information about the sword-cvs mailing list