Removed unused isLibrary from flag addSource in CompilerStack

This commit is contained in:
Alex Beregszaszi
2019-03-20 17:41:51 +00:00
parent 9aab2329ed
commit ea1944bb2d
2 changed files with 3 additions and 6 deletions
+2 -4
View File
@@ -160,12 +160,11 @@ void CompilerStack::reset(bool _keepSources)
m_errorReporter.clear();
}
bool CompilerStack::addSource(string const& _name, string const& _content, bool _isLibrary)
bool CompilerStack::addSource(string const& _name, string const& _content)
{
bool existed = m_sources.count(_name) != 0;
reset(true);
m_sources[_name].scanner = make_shared<Scanner>(CharStream(_content, _name));
m_sources[_name].isLibrary = _isLibrary;
m_stackState = SourcesSet;
return existed;
}
@@ -828,8 +827,7 @@ void CompilerStack::resolveImports()
};
for (auto const& sourcePair: m_sources)
if (!sourcePair.second.isLibrary)
toposort(&sourcePair.second);
toposort(&sourcePair.second);
swap(m_sourceOrder, sourceOrder);
}