summaryrefslogtreecommitdiff
path: root/src/modules/filters/osismorph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/osismorph.cpp')
-rw-r--r--src/modules/filters/osismorph.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/modules/filters/osismorph.cpp b/src/modules/filters/osismorph.cpp
index 7ceec79..71de8e5 100644
--- a/src/modules/filters/osismorph.cpp
+++ b/src/modules/filters/osismorph.cpp
@@ -1,10 +1,11 @@
/******************************************************************************
*
- * osismorph - SWFilter descendant to hide or show morph tags
- * in a OSIS module.
+ * osismorph.cpp - SWFilter descendant to hide or show morph tags
+ * in a OSIS module
*
+ * $Id: osismorph.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
@@ -25,14 +26,20 @@
SWORD_NAMESPACE_START
-const char oName[] = "Morphological Tags";
-const char oTip[] = "Toggles Morphological Tags On and Off if they exist";
+namespace {
-const SWBuf choices[3] = {"Off", "On", ""};
-const StringList oValues(&choices[0], &choices[2]);
+ static const char oName[] = "Morphological Tags";
+ static const char oTip[] = "Toggles Morphological Tags On and Off if they exist";
-OSISMorph::OSISMorph() : SWOptionFilter(oName, oTip, &oValues) {
- setOptionValue("Off");
+ static const StringList *oValues() {
+ static const SWBuf choices[3] = {"Off", "On", ""};
+ static const StringList oVals(&choices[0], &choices[2]);
+ return &oVals;
+ }
+
+}
+
+OSISMorph::OSISMorph() : SWOptionFilter(oName, oTip, oValues()) {
}
@@ -45,7 +52,6 @@ char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *modul
char token[2048]; // cheese. Fix.
int tokpos = 0;
bool intoken = false;
- bool lastspace = false;
SWBuf orig = text;
const char *from = orig.c_str();
@@ -90,7 +96,6 @@ char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *modul
}
else {
text.append(*from);
- lastspace = (*from == ' ');
}
}
}