Browse Source

Work around adding an STD name-space to a custom header

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1641/head
Dimitar Dobrev 5 years ago
parent
commit
0214b6e1cc
  1. 4
      src/Parser/ASTConverter.cs

4
src/Parser/ASTConverter.cs

@ -1038,8 +1038,12 @@ namespace CppSharp
{ {
var decl = ctx.GetNamespaces(i); var decl = ctx.GetNamespaces(i);
var _decl = Visit(decl) as AST.Namespace; var _decl = Visit(decl) as AST.Namespace;
// HACK: we have an irreproducible case where an STD name-space is added to a custom header
if (_decl.Namespace == _ctx)
{
_ctx.Declarations.Add(_decl); _ctx.Declarations.Add(_decl);
} }
}
for (uint i = 0; i < ctx.EnumsCount; ++i) for (uint i = 0; i < ctx.EnumsCount; ++i)
{ {

Loading…
Cancel
Save