Commit c6740ad9 authored by Daniel Seither's avatar Daniel Seither

CppMarshal: Always emit nn header include for interface

Previously, the nn header was only included when the argument or return
type of an interface's method was not equal to the interface itself.

Fixes #197
parent f2e35572
......@@ -66,15 +66,15 @@ class CppMarshal(spec: Spec) extends Marshal(spec) {
List()
}
case DInterface =>
if (d.name != exclude) {
val base = List(ImportRef("<memory>"), DeclRef(s"class ${typename(d.name, d.body)};", Some(spec.cppNamespace)))
val base = if (d.name != exclude) {
List(ImportRef("<memory>"), DeclRef(s"class ${typename(d.name, d.body)};", Some(spec.cppNamespace)))
} else {
List(ImportRef("<memory>"))
}
spec.cppNnHeader match {
case Some(nnHdr) => ImportRef(nnHdr) :: base
case _ => base
}
} else {
List(ImportRef("<memory>"))
}
}
case e: MExtern => e.defType match {
// 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