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

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
This commit is contained in:
Dimitar Dobrev 2021-11-12 10:24:23 +02:00
Родитель 0b8f252d1b
Коммит 0214b6e1cc
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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)