File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ public virtual bool VisitTranslationUnit(TranslationUnit unit)
311
311
if ( ! VisitDeclaration ( unit ) )
312
312
return false ;
313
313
314
- return VisitDeclarationContext ( unit ) ;
314
+ return VisitNamespace ( unit ) ;
315
315
}
316
316
317
317
public virtual bool VisitClassDecl ( Class @class )
Original file line number Diff line number Diff line change 3
3
4
4
namespace CppSharp . Passes
5
5
{
6
- class SortDeclarationsPass : TranslationUnitPass
6
+ public class SortDeclarationsPass : TranslationUnitPass
7
7
{
8
- private static void SortDeclarations ( Namespace @namespace )
8
+ public override bool VisitNamespace ( Namespace @namespace )
9
9
{
10
- @namespace . Declarations = @namespace . Declarations . OrderBy (
11
- declaration => declaration . DefinitionOrder ) . ToList ( ) ;
12
-
13
- foreach ( var childNamespace in @namespace . Namespaces )
14
- SortDeclarations ( childNamespace ) ;
15
- }
10
+ if ( ! base . VisitNamespace ( @namespace ) || @namespace . Ignore )
11
+ return false ;
16
12
17
- public override bool VisitTranslationUnit ( TranslationUnit unit )
18
- {
19
- SortDeclarations ( unit ) ;
13
+ @namespace . Declarations = @namespace . Declarations . OrderBy (
14
+ d => d . DefinitionOrder ) . ToList ( ) ;
20
15
return true ;
21
16
}
22
17
}
You can’t perform that action at this time.
0 commit comments