#2186 optional attribute setter fix

This commit is contained in:
Thomas Krijnen
2022-05-16 13:06:54 +02:00
parent c95d3693ea
commit 3cb68ca388
2 changed files with 7 additions and 5 deletions
@@ -159,6 +159,8 @@ class Implementation(codegen.Base):
"type": arg["full_type"].replace("::Value", ""),
"non_optional_type": arg["non_optional_type"].replace("::Value", ""),
"star_if_optional": "*" if "boost::optional" in arg["full_type"] else "",
"check_optional_set_begin": "if (v) {" if "boost::optional" in arg["full_type"] else "",
"check_optional_set_end": "}" if "boost::optional" in arg["full_type"] else "",
},
)