[sword-cvs] sword/src/utilfuns swbuf.cpp,1.19,1.20

sword at www.crosswire.org sword at www.crosswire.org
Wed Jun 16 02:04:22 MST 2004


Committed by: mgruner

Update of /cvs/core/sword/src/utilfuns
In directory www:/tmp/cvs-serv31372/src/utilfuns

Modified Files:
	swbuf.cpp 
Log Message:
mgruner: proof-of-concept patch. makes major changes. roll back if you don't 
	like the implementation.

=) just kidding. This removes the unnecessary check in swbuf for speed reasons
and updates the doc to give a warning about this.



Index: swbuf.cpp
===================================================================
RCS file: /cvs/core/sword/src/utilfuns/swbuf.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- swbuf.cpp	10 Jun 2004 16:02:14 -0000	1.19
+++ swbuf.cpp	16 Jun 2004 09:04:20 -0000	1.20
@@ -138,10 +138,11 @@
 
 /******************************************************************************
 * SWBuf::append - appends a value to the current value of this SWBuf
+* 
 */
 void SWBuf::append(const char *str, const long max) {
-	if (!str) //A null string was passed
-		return;
+//	if (!str) //A null string was passed
+//		return;
 	//make sure we only copy strlen(str) bytes if max is larger than strlen(str) is
 	unsigned long str_len = strlen( str );
 	unsigned long len = (max > -1) ? ((max <= str_len) ? max : str_len) : str_len;
@@ -180,8 +181,8 @@
 }
 
 void SWBuf::insert(const unsigned long pos, const char* str, const signed long max) {
-	if (!str) //A null string was passed
-		return;
+// 	if (!str) //A null string was passed
+// 		return;
 
 	const int len = (max > -1) ? max : strlen(str);
 



More information about the sword-cvs mailing list