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