summaryrefslogtreecommitdiff
path: root/src/modules/filters/osislemma.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/osislemma.cpp')
-rw-r--r--src/modules/filters/osislemma.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/modules/filters/osislemma.cpp b/src/modules/filters/osislemma.cpp
index 7b56024..cf5d8f4 100644
--- a/src/modules/filters/osislemma.cpp
+++ b/src/modules/filters/osislemma.cpp
@@ -1,10 +1,11 @@
/******************************************************************************
*
- * osislemma - SWFilter descendant to hide or show lemmata
- * in a OSIS module.
+ * osislemma.cpp - SWFilter descendant to hide or show lemmata
+ * in a OSIS module
*
+ * $Id: osislemma.cpp 2980 2013-09-14 21:51:47Z scribe $
*
- * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -24,16 +25,23 @@
#include <osislemma.h>
#include <utilxml.h>
+
SWORD_NAMESPACE_START
-const char oName[] = "Lemmas";
-const char oTip[] = "Toggles Lemmas On and Off if they exist";
+namespace {
+
+ static const char oName[] = "Lemmas";
+ static const char oTip[] = "Toggles Lemmas On and Off if they exist";
+
+ static const StringList *oValues() {
+ static const SWBuf choices[3] = {"Off", "On", ""};
+ static const StringList oVals(&choices[0], &choices[2]);
+ return &oVals;
+ }
+}
-const SWBuf choices[3] = {"Off", "On", ""};
-const StringList oValues(&choices[0], &choices[2]);
-OSISLemma::OSISLemma() : SWOptionFilter(oName, oTip, &oValues) {
- setOptionValue("Off");
+OSISLemma::OSISLemma() : SWOptionFilter(oName, oTip, oValues()) {
}
@@ -44,7 +52,6 @@ OSISLemma::~OSISLemma() {
char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
SWBuf token;
bool intoken = false;
- bool lastspace = false;
const SWBuf orig = text;
const char * from = orig.c_str();
@@ -90,7 +97,6 @@ char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *modul
}
else {
text.append(*from);
- lastspace = (*from == ' ');
}
}
}