mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user