Change-Id: I6752997dd65467f2040a036a05b4f0fc8a61e2b4
Signed-off-by: Botond Baranyi <botond.baranyi@ericsson.com>
- if (is_empty) {
- // all of the record's fields are unused (-), set the record to unused
- // to avoid unnecessary code generation
- value->set_valuetype(Value::V_NOTUSED);
- }
- else if (!incomplete_allowed || implicit_omit) {
+ if (!incomplete_allowed || implicit_omit) {
for (size_t i = 0; i < n_type_comps; i++) {
const Identifier& id = get_comp_byIndex(i)->get_name();
if (!comp_map.has_key(id.get_name())) {
for (size_t i = 0; i < n_type_comps; i++) {
const Identifier& id = get_comp_byIndex(i)->get_name();
if (!comp_map.has_key(id.get_name())) {
- if (get_comp_byIndex(i)->get_is_optional() && implicit_omit)
+ if (get_comp_byIndex(i)->get_is_optional() && implicit_omit) {
value->add_se_comp(new NamedValue(new Identifier(id),
new Value(Value::V_OMIT)));
value->add_se_comp(new NamedValue(new Identifier(id),
new Value(Value::V_OMIT)));
else if (!incomplete_allowed)
value->error("Field `%s' is missing from record value",
id.get_dispname().c_str());
}
}
}
else if (!incomplete_allowed)
value->error("Field `%s' is missing from record value",
id.get_dispname().c_str());
}
}
}
+ if (is_empty) {
+ // all of the record's fields are unused (-), set the record to unused
+ // to avoid unnecessary code generation
+ value->set_valuetype(Value::V_NOTUSED);
+ }
comp_map.clear();
return self_ref;
}
comp_map.clear();
return self_ref;
}
- if (is_empty) {
- // all of the set's fields are unused (-), set the set to unused to avoid
- // unnecessary code generation
- value->set_valuetype(Value::V_NOTUSED);
- }
- else if (!incomplete_allowed || implicit_omit) {
+ if (!incomplete_allowed || implicit_omit) {
for (size_t i = 0; i < n_type_comps; i++) {
const Identifier& id = get_comp_byIndex(i)->get_name();
if(!comp_map.has_key(id.get_name())) {
for (size_t i = 0; i < n_type_comps; i++) {
const Identifier& id = get_comp_byIndex(i)->get_name();
if(!comp_map.has_key(id.get_name())) {
- if (get_comp_byIndex(i)->get_is_optional() && implicit_omit)
+ if (get_comp_byIndex(i)->get_is_optional() && implicit_omit) {
value->add_se_comp(new NamedValue(new Identifier(id),
new Value(Value::V_OMIT)));
value->add_se_comp(new NamedValue(new Identifier(id),
new Value(Value::V_OMIT)));
else if (!incomplete_allowed)
value->error("Field `%s' is missing from set value %s",
id.get_dispname().c_str(), implicit_omit ? "yes" : "no");
}
}
}
else if (!incomplete_allowed)
value->error("Field `%s' is missing from set value %s",
id.get_dispname().c_str(), implicit_omit ? "yes" : "no");
}
}
}
+ if (is_empty) {
+ // all of the set's fields are unused (-), set the set to unused to avoid
+ // unnecessary code generation
+ value->set_valuetype(Value::V_NOTUSED);
+ }
comp_map.clear();
return self_ref;
}
comp_map.clear();
return self_ref;
}