Commit ee0c2c1e authored by Andrew Twyman's avatar Andrew Twyman

Merge pull request #206 from tiwoc/nn-hppgen-fix

CppMarshal: Always emit nn header include for interface
parents 14df0468 c6740ad9
...@@ -66,15 +66,15 @@ class CppMarshal(spec: Spec) extends Marshal(spec) { ...@@ -66,15 +66,15 @@ class CppMarshal(spec: Spec) extends Marshal(spec) {
List() List()
} }
case DInterface => case DInterface =>
if (d.name != exclude) { val base = if (d.name != exclude) {
val base = List(ImportRef("<memory>"), DeclRef(s"class ${typename(d.name, d.body)};", Some(spec.cppNamespace))) List(ImportRef("<memory>"), DeclRef(s"class ${typename(d.name, d.body)};", Some(spec.cppNamespace)))
} else {
List(ImportRef("<memory>"))
}
spec.cppNnHeader match { spec.cppNnHeader match {
case Some(nnHdr) => ImportRef(nnHdr) :: base case Some(nnHdr) => ImportRef(nnHdr) :: base
case _ => base case _ => base
} }
} else {
List(ImportRef("<memory>"))
}
} }
case e: MExtern => e.defType match { case e: MExtern => e.defType match {
// Do not forward declare extern types, they might be in arbitrary namespaces. // Do not forward declare extern types, they might be in arbitrary namespaces.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment