summaryrefslogtreecommitdiff
path: root/src/modules/filters/thmlheadings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/thmlheadings.cpp')
-rw-r--r--src/modules/filters/thmlheadings.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/modules/filters/thmlheadings.cpp b/src/modules/filters/thmlheadings.cpp
index e2b7c97..46498d0 100644
--- a/src/modules/filters/thmlheadings.cpp
+++ b/src/modules/filters/thmlheadings.cpp
@@ -1,10 +1,11 @@
/******************************************************************************
*
- * thmlheadings - SWFilter descendant to hide or show headings
- * in a ThML module.
+ * thmlheadings.cpp - SWFilter descendant to hide or show headings
+ * in a ThML module
*
+ * $Id: thmlheadings.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
@@ -28,16 +29,23 @@
#include <swmodule.h>
#include <stdio.h>
+
SWORD_NAMESPACE_START
-const char oName[] = "Headings";
-const char oTip[] = "Toggles Headings On and Off if they exist";
+namespace {
+
+ static const char oName[] = "Headings";
+ static const char oTip[] = "Toggles Headings 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]);
-ThMLHeadings::ThMLHeadings() : SWOptionFilter(oName, oTip, &oValues) {
- setOptionValue("Off");
+ThMLHeadings::ThMLHeadings() : SWOptionFilter(oName, oTip, oValues()) {
}