The condition of the while statement has been modified to solve
'Dereferencingiterator lhs_iter thought it is already past the end
of its container'. In fact, in the above if conditional, it only
works when the size of the two containers is the same, so there is
no problem using '||'. However, it has been edited for clarity.
Signed-off-by: SeoHyungjun <hyungjun.seo@samsung.com>
if (lhs.size() == rhs.size()) {
auto lhs_iter = lhs.cbegin();
auto rhs_iter = rhs.cbegin();
- while(lhs_iter != lhs.cend() || rhs_iter != rhs.cend()) {
+ while(lhs_iter != lhs.cend() && rhs_iter != rhs.cend()) {
auto lhs = *lhs_iter;
auto rhs = *rhs_iter;
is_node_equal(*lhs.get(), *rhs.get());