diff options
Diffstat (limited to 'src/modules/filters/gbfmorph.cpp')
-rw-r--r-- | src/modules/filters/gbfmorph.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/modules/filters/gbfmorph.cpp b/src/modules/filters/gbfmorph.cpp index d7c8ab4..3399ae8 100644 --- a/src/modules/filters/gbfmorph.cpp +++ b/src/modules/filters/gbfmorph.cpp @@ -1,10 +1,11 @@ /****************************************************************************** * - * gbfmorph - SWFilter descendant to hide or show morph tags - * in a GBF module. + * gbfmorph.cpp - SWFilter descendant to hide or show morph tags + * in a GBF module * + * $Id: gbfmorph.cpp 2980 2013-09-14 21:51:47Z scribe $ * - * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org) + * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society * P. O. Box 2528 * Tempe, AZ 85280-2528 @@ -23,16 +24,23 @@ #include <stdlib.h> #include <gbfmorph.h> + SWORD_NAMESPACE_START -const char oName[] = "Morphological Tags"; -const char oTip[] = "Toggles Morphological Tags On and Off if they exist"; +namespace { + + static const char oName[] = "Morphological Tags"; + static const char oTip[] = "Toggles Morphological Tags 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]); -GBFMorph::GBFMorph() : SWOptionFilter(oName, oTip, &oValues) { - setOptionValue("Off"); +GBFMorph::GBFMorph() : SWOptionFilter(oName, oTip, oValues()) { } |