[sword-svn] r3855 - trunk/examples/tasks

scribe at crosswire.org scribe at crosswire.org
Mon Apr 12 15:25:09 EDT 2021


Author: scribe
Date: 2021-04-12 15:25:09 -0400 (Mon, 12 Apr 2021)
New Revision: 3855

Modified:
   trunk/examples/tasks/findHeadings.cpp
Log:
rearrange a few lines in new findHeadings example to read more clearly


Modified: trunk/examples/tasks/findHeadings.cpp
===================================================================
--- trunk/examples/tasks/findHeadings.cpp	2021-04-12 19:05:00 UTC (rev 3854)
+++ trunk/examples/tasks/findHeadings.cpp	2021-04-12 19:25:09 UTC (rev 3855)
@@ -41,15 +41,13 @@
 	library.setGlobalOption("Headings", "On");
 
         SWModule *module = library.getModule(moduleName);
-	ListKey results;
-
 	if (!module) return cerr << "\nCouldn't find module: " << moduleName << "\n\n", -1;
 
 	SWKey *key = module->getKey();
 	VerseKey *verseKey = SWDYNAMIC_CAST(VerseKey, key);
 	ListKey scope = verseKey->parseVerseList(verseRange, *verseKey, true);
 
-	results = module->search("/Heading", SWModule::SEARCHTYPE_ENTRYATTR, 0, &scope);
+	ListKey results = module->search("/Heading", SWModule::SEARCHTYPE_ENTRYATTR, 0, &scope);
 
 	for (results = TOP; !results.popError(); results++) {
 		module->setKey(results);



More information about the sword-cvs mailing list