Skip to content
Snippets Groups Projects
Commit ef4a3656 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

only needs 2 comparisions during runtime.


Signed-off-by: default avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent 61f58853
No related branches found
No related tags found
No related merge requests found
......@@ -3643,13 +3643,18 @@ void defRecordOfTemplate1(const struct_of_def *sdef, output_struct *output)
"const Restricted_Length_Template *template_ptr,"
" int index_value, int index_template, boolean legacy)\n"
"{\n"
"if (value_ptr != NULL && template_ptr != NULL)"
"((const %s_template*)template_ptr)"
"->single_value.value_elements[index_template]"
"->log_match((*(const %s*)value_ptr)[index_value], legacy);\n"
"else if (value_ptr != NULL) (*(const %s*)value_ptr)[index_value].log();\n"
"else if (template_ptr != NULL) ((const %s_template*)template_ptr)"
"->single_value.value_elements[index_template]->log();\n"
"if (value_ptr == NULL) {\n"
"if (template_ptr != NULL) {\n"
"((const %s_template*)template_ptr)"
"->single_value.value_elements[index_template]->log();\n"
"}\n"
"} else if (template_ptr == NULL) {\n"
"(*(const %s*)value_ptr)[index_value].log();\n"
"} else {\n"
"((const %s_template*)template_ptr)"
"->single_value.value_elements[index_template]"
"->log_match((*(const %s*)value_ptr)[index_value], legacy);\n"
"}\n"
"}\n\n", name, name, name, name, name);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment