aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--org/ocda_obj_setter.org10
-rw-r--r--src/sisudoc/ocda/meta/metadoc_object_setter.d10
2 files changed, 10 insertions, 10 deletions
diff --git a/org/ocda_obj_setter.org b/org/ocda_obj_setter.org
index d410960..7d74a6e 100644
--- a/org/ocda_obj_setter.org
+++ b/org/ocda_obj_setter.org
@@ -126,10 +126,10 @@ struct DocObj_MetaInfo_ {
int heading_lev_markup = 9;
int heading_lev_collapsed = 9;
bool dummy_heading = false;
- int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int[8] markedup_ancestors; // fixed length: one slot per heading level
+ int[8] collapsed_ancestors;
+ int[8] dom_structure_markedup_tags_status;
+ int[8] dom_structure_collapsed_tags_status;
int parent_lev_markup = 0;
int parent_ocn = 0;
int last_descendant_ocn = 0;
@@ -175,7 +175,7 @@ struct DocObj_Pointer_ {
int heading = 0;
}
struct DocObj_Tags_ {
- string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
+ string[8] heading_ancestors_text; // fixed: a dynamic array with a literal default is shared by every default constructed object
string anchor_tag_html = "";
string in_segment_html = "";
string segment_anchor_tag_epub = "";
diff --git a/src/sisudoc/ocda/meta/metadoc_object_setter.d b/src/sisudoc/ocda/meta/metadoc_object_setter.d
index e7ff88b..ba2f268 100644
--- a/src/sisudoc/ocda/meta/metadoc_object_setter.d
+++ b/src/sisudoc/ocda/meta/metadoc_object_setter.d
@@ -89,7 +89,7 @@ template ObjectSetter() {
int heading = 0;
}
struct DocObj_Tags_ {
- string[] heading_ancestors_text = [ "", "", "", "", "", "", "", "", ];
+ string[8] heading_ancestors_text; // fixed: a dynamic array with a literal default is shared by every default constructed object
string anchor_tag_html = "";
string in_segment_html = "";
string segment_anchor_tag_epub = "";
@@ -178,10 +178,10 @@ template ObjectSetter() {
int heading_lev_markup = 9;
int heading_lev_collapsed = 9;
bool dummy_heading = false;
- int[] markedup_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] collapsed_ancestors = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] dom_structure_markedup_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
- int[] dom_structure_collapsed_tags_status = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ int[8] markedup_ancestors; // fixed length: one slot per heading level
+ int[8] collapsed_ancestors;
+ int[8] dom_structure_markedup_tags_status;
+ int[8] dom_structure_collapsed_tags_status;
int parent_lev_markup = 0;
int parent_ocn = 0;
int last_descendant_ocn = 0;