Skip to content

Commit

Permalink
Fixed adding the main file as a preincluded requirement on the Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Viladoman committed Jan 14, 2024
1 parent d68e3d6 commit 3fc871c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public static string GetInclusionBucketText(object node)
if (node is RequirementGraphNode)
{
RequirementGraphNode graphNode = (RequirementGraphNode) node;
if (graphNode.Row < 1)
if (graphNode.Row < 0)
{
return "PreInclude";
}
Expand Down
8 changes: 2 additions & 6 deletions Parser/src/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ namespace CompileScore
{
File& file = result.files[i];

//we want to export these as 'already included'
//if ( file.mainIncludeeIndex < 0 )
// continue;

if ( file.mainIncludeeIndex != i && IsFileEmpty(file) )
{
// Skip non direct empty includes
Expand All @@ -64,9 +60,9 @@ namespace CompileScore
for (size_t i = 0, sz = result.finalFiles.size(); i < sz; ++i)
{
File* file = result.finalFiles[i];
if (file->mainIncludeeIndex < 0)
if (file->mainIncludeeIndex < 0 && i != 0 )
{
//preinclude
//preinclude: ( not the main file but not in the include trees )
result.preIncludes.emplace_back(file->exportIndex);
}
else
Expand Down

0 comments on commit 3fc871c

Please sign in to comment.