Use fully qualified names of structs in UnPack

This commit is contained in:
Caleb Epstein
2016-07-28 15:22:29 -04:00
parent c9ee9fb99d
commit 6897bb99bb

View File

@@ -975,8 +975,10 @@ class CppGenerator : public BaseGenerator {
if (invector) {
return "*" + val;
} else {
return "std::unique_ptr<" + type.struct_def->name +
">(new " + type.struct_def->name + "(*" + val + "))";
return "std::unique_ptr<" +
WrapInNameSpace (*type.struct_def) +
">(new " +
WrapInNameSpace (*type.struct_def) + "(*" + val + "))";
}
} else {
return val + "->UnPack()";