[sword-cvs] sword/src/modules/texts/ztext ztext.cpp,1.42,1.43

sword@www.crosswire.org sword@www.crosswire.org
Thu, 28 Aug 2003 23:13:30 -0700


Update of /usr/local/cvsroot/sword/src/modules/texts/ztext
In directory www:/tmp/cvs-serv15088/src/modules/texts/ztext

Modified Files:
	ztext.cpp 
Log Message:



Index: ztext.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/texts/ztext/ztext.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- ztext.cpp	29 Aug 2003 06:00:16 -0000	1.42
+++ ztext.cpp	29 Aug 2003 06:13:28 -0000	1.43
@@ -53,6 +53,7 @@
 		: zVerse(ipath, -1, iblockType, icomp), SWText(iname, idesc, idisp, enc, dir, mark, ilang) {
 	blockType = iblockType;
 	lastWriteKey = 0;
+#ifdef USELUCENE
 	SWBuf fname;
 	fname = path;
 	ir = 0;
@@ -64,6 +65,7 @@
 		ir = &IndexReader::open(fname);
 		is = new IndexSearcher(*ir);
 	}
+#endif
 }
 
 
@@ -78,11 +80,13 @@
 	if (lastWriteKey)
 		delete lastWriteKey;
 
+#ifdef USELUCENE
 	if (is)
-		((IndexSearcher *)is)->close();
+		is->close();
 
 	if (ir)
-		delete (IndexReader *)ir;
+		delete ir;
+#endif
 }