[sword-svn] r3582 - trunk/examples/tasks
scribe at crosswire.org
scribe at crosswire.org
Tue May 15 18:38:11 MST 2018
Author: scribe
Date: 2018-05-15 18:38:10 -0700 (Tue, 15 May 2018)
New Revision: 3582
Modified:
trunk/examples/tasks/listbiblebooknames.cpp
Log:
added check to be sure the book is present before display
Modified: trunk/examples/tasks/listbiblebooknames.cpp
===================================================================
--- trunk/examples/tasks/listbiblebooknames.cpp 2018-03-29 01:08:02 UTC (rev 3581)
+++ trunk/examples/tasks/listbiblebooknames.cpp 2018-05-16 01:38:10 UTC (rev 3582)
@@ -46,7 +46,9 @@
VerseKey *vk = (bible) ? (VerseKey *)bible->getKey() : new VerseKey();
for ((*vk) = TOP; !vk->popError(); vk->setBook(vk->getBook()+1)) {
- cout << vk->getBookName() << "\n";
+ if (!bible || bible->hasEntry(vk)) {
+ cout << vk->getBookName() << "\n";
+ }
}
// if we 'new'ed a VerseKey unassociated with a module, above, then we should delete it.
More information about the sword-cvs
mailing list