Fixed bugs in pop_front and insert_after.

This commit is contained in:
John Wellbelove 2016-05-03 18:51:00 +01:00
parent 55179454f2
commit 74c8bf0e20

View File

@ -426,7 +426,7 @@ namespace etl
void pop_front()
{
#if defined(ETL_CHECK_PUSH_POP)
ETL_ASSERT(!full(), ETL_ERROR(forward_list_empty));
ETL_ASSERT(!empty(), ETL_ERROR(forward_list_empty));
#endif
remove_node_after(start_node);
}
@ -500,7 +500,7 @@ namespace etl
{
// Set up the next free node.
Data_Node& data_node = allocate_data_node(value);
insert_node(*position.p_node, data_node);
insert_node_after(*position.p_node, data_node);
}
}