Skip to content

Commit

Permalink
Merge pull request dropbox#206 from tiwoc/nn-hppgen-fix
Browse files Browse the repository at this point in the history
CppMarshal: Always emit nn header include for interface
  • Loading branch information
artwyman committed Feb 9, 2016
2 parents 14df046 + c6740ad commit ee0c2c1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/source/CppMarshal.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
spec.cppNnHeader match {
case Some(nnHdr) => ImportRef(nnHdr) :: base
case _ => base
}
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
}
}
case e: MExtern => e.defType match {
// Do not forward declare extern types, they might be in arbitrary namespaces.
Expand Down

0 comments on commit ee0c2c1

Please sign in to comment.