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 4 years ago
parent
commit
0214b6e1cc
  1. 6
      src/Parser/ASTConverter.cs

6
src/Parser/ASTConverter.cs

@ -1038,7 +1038,11 @@ namespace CppSharp @@ -1038,7 +1038,11 @@ namespace CppSharp
{
var decl = ctx.GetNamespaces(i);
var _decl = Visit(decl) as AST.Namespace;
_ctx.Declarations.Add(_decl);
// 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);
}
}
for (uint i = 0; i < ctx.EnumsCount; ++i)

Loading…
Cancel
Save