[sword-svn] r3596 - trunk/src/modules

scribe at crosswire.org scribe at crosswire.org
Sun Nov 4 16:50:18 MST 2018


Author: scribe
Date: 2018-11-04 16:50:18 -0700 (Sun, 04 Nov 2018)
New Revision: 3596

Modified:
   trunk/src/modules/swmodule.cpp
Log:
Moved toupper of testBuf out of multi-term search loop, for optimization

Modified: trunk/src/modules/swmodule.cpp
===================================================================
--- trunk/src/modules/swmodule.cpp	2018-09-10 13:20:58 UTC (rev 3595)
+++ trunk/src/modules/swmodule.cpp	2018-11-04 23:50:18 UTC (rev 3596)
@@ -731,8 +731,8 @@
 						else testBuf.setSize(0);
 						foundWords = 0;
 
+						if ((flags & REG_ICASE) == REG_ICASE) toupperstr(testBuf.size() ? testBuf : textBuf);
 						for (unsigned int i = 0; i < words.size(); i++) {
-							if ((flags & REG_ICASE) == REG_ICASE) toupperstr(testBuf.size() ? testBuf : textBuf);
 							sres = strstr(testBuf.size() ? testBuf.c_str() : textBuf.c_str(), words[i].c_str());
 							if (!sres) {
 								break; //for loop




More information about the sword-cvs mailing list