aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/default_misc.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-01-05 20:17:17 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-02-11 13:08:49 -0500
commitde02319cfa7b4bbff8c111bda02be1a7c6591555 (patch)
tree732c11d10bc2699cd1b72d00b3be943284eea130 /org/default_misc.org
parentreduce use of auto, much with tuples (diff)
dlang safe default imminent, look ahead
- @safe @trusted & @system, reconsider @trusted
Diffstat (limited to 'org/default_misc.org')
-rw-r--r--org/default_misc.org22
1 files changed, 11 insertions, 11 deletions
diff --git a/org/default_misc.org b/org/default_misc.org
index 5351c30..d5fd76d 100644
--- a/org/default_misc.org
+++ b/org/default_misc.org
@@ -40,7 +40,7 @@ module doc_reform.meta.defaults;
#+BEGIN_SRC d
template spineRgxInitFlags() {
/+ regex flags +/
- static int[string] flags_type_init() {
+ @safe static int[string] flags_type_init() {
int[string] flags_type_init = [
"make_headings" : 0,
"header_make" : 0,
@@ -87,7 +87,7 @@ template spineRgxInitFlags() {
#+name: meta_defaults_template_node
#+BEGIN_SRC d
template spineNode() {
- static string[string] node_metadata_heading_str() {
+ @safe static string[string] node_metadata_heading_str() {
string[string] _node = [
"is" : "",
"ocn" : "",
@@ -98,7 +98,7 @@ template spineNode() {
];
return _node;
}
- static int[string] node_metadata_heading_int() {
+ @safe static int[string] node_metadata_heading_int() {
int[string] _node = [
"ocn" : 0, // decide whether to use or keep?
"ptr_doc_object" : 0,
@@ -111,7 +111,7 @@ template spineNode() {
];
return _node;
}
- static string[string] node_metadata_para_str() {
+ @safe static string[string] node_metadata_para_str() {
string[string] _node = [
"is" : "",
"ocn" : "",
@@ -119,7 +119,7 @@ template spineNode() {
];
return _node;
}
- static int[string] node_metadata_para_int() {
+ @safe static int[string] node_metadata_para_int() {
int[string] _node = [
"ocn" : 0,
"indent_base" : 0,
@@ -136,7 +136,7 @@ template spineNode() {
#+name: meta_defaults_template_harvest
#+BEGIN_SRC d
template spineHarvest() {
- auto spineHarvest() {
+ @safe auto spineHarvest() {
struct _Harvest {
struct Harvest {
string title = "";
@@ -176,7 +176,7 @@ template spineHarvest() {
template spineBiblio() {
// required: deemed_author (author || editor); year; fulltitle;
struct BibJsnStr {
- static auto biblio_entry_tags_jsonstr() {
+ @safe static auto biblio_entry_tags_jsonstr() {
string x = `{
"is" : "",
"sortby_deemed_author_year_title" : "",
@@ -313,7 +313,7 @@ template InternalMarkup() {
template spineLanguageCodes() {
/+ language codes +/
struct Lang {
- static string[string][string] codes() {
+ @safe static string[string][string] codes() {
auto _lang_codes = [
"am": [ "c": "am", "n": "Amharic", "t": "Amharic", "xlp": "amharic" ],
"bg": [ "c": "bg", "n": "Bulgarian", "t": "Български (Bəlgarski)", "xlp": "bulgarian" ],
@@ -380,15 +380,15 @@ template spineLanguageCodes() {
];
return _lang_codes;
}
- static string[] code_arr_ptr() {
+ @safe static string[] code_arr_ptr() {
string[] _lang_codes = ["am", "bg", "bn", "br", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hy", "ia", "is", "it", "ja", "ko", "la", "lo", "lt", "lv", "ml", "mr", "nl", "no", "nn", "oc", "pl", "pt", "pt_BR", "ro", "ru", "sa", "se", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tk", "tr", "uk", "ur", "us", "vi", "zh", "en", "xx",];
return _lang_codes;
}
- static string[] code_arr() {
+ @safe static string[] code_arr() {
string[] _lang_codes = ["am", "bg", "bn", "br", "ca", "cs", "cy", "da", "de", "el", "en", "eo", "es", "et", "eu", "fi", "fr", "ga", "gl", "he", "hi", "hr", "hy", "ia", "is", "it", "ja", "ko", "la", "lo", "lt", "lv", "ml", "mr", "nl", "no", "nn", "oc", "pl", "pt", "pt_BR", "ro", "ru", "sa", "se", "sk", "sl", "sq", "sr", "sv", "ta", "te", "th", "tk", "tr", "uk", "ur", "vi", "zh"];
return _lang_codes;
}
- static auto codes_() {
+ @safe static auto codes_() {
return "(" ~ join(code_arr,"|") ~ ")";
}
static auto codes_regex() {