Use assertations to make code cleaner.
This commit is contained in:
parent
525dad7623
commit
e48b2f6598
1 changed files with 3 additions and 12 deletions
|
@ -123,26 +123,17 @@ void text_itemizer::create_item_list()
|
||||||
output.push_back(item);
|
output.push_back(item);
|
||||||
if (script_itr->limit == next_position)
|
if (script_itr->limit == next_position)
|
||||||
{
|
{
|
||||||
if (script_itr == script_end) {
|
assert(script_itr != script_end);
|
||||||
//TODO: EXCEPTION
|
|
||||||
std::cerr << "Limit error\n";
|
|
||||||
}
|
|
||||||
script_itr++;
|
script_itr++;
|
||||||
}
|
}
|
||||||
if (dir_itr->limit == next_position)
|
if (dir_itr->limit == next_position)
|
||||||
{
|
{
|
||||||
if (dir_itr == dir_end) {
|
assert(dir_itr != dir_end);
|
||||||
//TODO: EXCEPTION
|
|
||||||
std::cerr << "Limit error\n";
|
|
||||||
}
|
|
||||||
dir_itr++;
|
dir_itr++;
|
||||||
}
|
}
|
||||||
if (format_itr->limit == next_position)
|
if (format_itr->limit == next_position)
|
||||||
{
|
{
|
||||||
if (format_itr == format_end) {
|
assert(format_itr != format_end);
|
||||||
//TODO: EXCEPTION
|
|
||||||
std::cerr << "Limit error\n";
|
|
||||||
}
|
|
||||||
format_itr++;
|
format_itr++;
|
||||||
}
|
}
|
||||||
position = next_position;
|
position = next_position;
|
||||||
|
|
Loading…
Reference in a new issue