File tree 4 files changed +11
-4
lines changed
4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . IO ;
3
4
using System . Linq ;
4
5
using CppSharp . AST ;
5
6
using CppSharp . AST . Extensions ;
@@ -87,7 +88,8 @@ public void GenerateIncludeForwardRefs(TranslationUnit unit)
87
88
if ( typeRef . Include . TranslationUnit == unit )
88
89
continue ;
89
90
90
- if ( typeRef . Include . File == unit . FileName )
91
+ var filename = Context . Options . GenerateName != null ? $ "{ Context . Options . GenerateName ( TranslationUnit ) } { Path . GetExtension ( TranslationUnit . FileName ) } " : TranslationUnit . FileName ;
92
+ if ( typeRef . Include . File == filename )
91
93
continue ;
92
94
93
95
var include = typeRef . Include ;
Original file line number Diff line number Diff line change @@ -64,7 +64,8 @@ public virtual void GenerateForwardReferenceHeaders(TranslationUnit unit)
64
64
65
65
foreach ( var typeRef in typeReferenceCollector . TypeReferences )
66
66
{
67
- if ( typeRef . Include . File == unit . FileName )
67
+ var filename = Context . Options . GenerateName != null ? $ "{ Context . Options . GenerateName ( TranslationUnit ) } { Path . GetExtension ( TranslationUnit . FileName ) } " : TranslationUnit . FileName ;
68
+ if ( typeRef . Include . File == filename )
68
69
continue ;
69
70
70
71
var include = typeRef . Include ;
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
+ using System . IO ;
3
4
using System . Linq ;
4
5
using CppSharp . AST ;
5
6
using CppSharp . AST . Extensions ;
@@ -61,7 +62,8 @@ public void GenerateIncludeForwardRefs()
61
62
if ( typeRef . Include . TranslationUnit == TranslationUnit )
62
63
continue ;
63
64
64
- if ( typeRef . Include . File == TranslationUnit . FileName )
65
+ var filename = Context . Options . GenerateName != null ? $ "{ Context . Options . GenerateName ( TranslationUnit ) } { Path . GetExtension ( TranslationUnit . FileName ) } " : TranslationUnit . FileName ;
66
+ if ( typeRef . Include . File == filename )
65
67
continue ;
66
68
67
69
var include = typeRef . Include ;
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . Globalization ;
4
+ using System . IO ;
4
5
using System . Linq ;
5
6
using CppSharp . AST ;
6
7
using CppSharp . AST . Extensions ;
@@ -61,7 +62,8 @@ public void GenerateForwardReferenceHeaders()
61
62
62
63
foreach ( var typeRef in typeReferenceCollector . TypeReferences )
63
64
{
64
- if ( typeRef . Include . File == TranslationUnit . FileName )
65
+ var filename = Context . Options . GenerateName != null ? $ "{ Context . Options . GenerateName ( TranslationUnit ) } { Path . GetExtension ( TranslationUnit . FileName ) } " : TranslationUnit . FileName ;
66
+ if ( typeRef . Include . File == filename )
65
67
continue ;
66
68
67
69
var include = typeRef . Include ;
You can’t perform that action at this time.
0 commit comments