Optimization for include resolving in PreprocessorWrapper.

Reduces the number of copying and decreases the computational
complexity.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3439
This was SVN commit r24740.
This commit is contained in:
vladislavbelov
2021-01-20 23:05:15 +00:00
parent b7000b373a
commit 5d2be02f68
3 changed files with 82 additions and 54 deletions
@@ -273,7 +273,7 @@ public:
if (depth < 4)
{
std::stringstream nextIncludes;
for (int idx = 0; idx < 8; ++idx)
for (int idx = 0; idx < 16; ++idx)
nextIncludes << "#include \"" << depth + 1 << ".h\"\n";
out = nextIncludes.str();
}
@@ -292,6 +292,6 @@ public:
)", includeCallback);
const double finish = timer_Time();
printf("Total: %lfs\n", finish - start);
TS_ASSERT_EQUALS(result.output.Trim(PS_TRIM_BOTH).size(), 132824u);
TS_ASSERT_EQUALS(result.output.Trim(PS_TRIM_BOTH).size(), 2075304u);
}
};