Commit 827eb235 authored by aggsol's avatar aggsol 🙉

check for straying sections

parent 574ec674
......@@ -85,16 +85,23 @@ int main(int argc, char* argv[])
}
// Check parents
int last = -1;
for(auto& s: sections)
{
if(s.first > 1)
{
if(s.first - last != 1)
{
std::cerr << "Warning: Missing section: " << s.first - 1 "\n";
}
if(s.second.m_parents.size() == 0)
{
assert(s.first == s.second.m_number);
std::cerr << "Warning: No reference to section: " << s.first << "\n";
}
}
last = s.first;
}
if(verbose)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment