- index_src = path_src->used - 1;
- index_dst = path_dst->used - 1;
- current_src = (As **) xbt_dynar_get_ptr(path_src, index_src);
- current_dst = (As **) xbt_dynar_get_ptr(path_dst, index_dst);
- while (index_src >= 0 && index_dst >= 0 && *current_src == *current_dst) {
- xbt_dynar_pop_ptr(path_src);
- xbt_dynar_pop_ptr(path_dst);
- index_src--;
- index_dst--;
- current_src = (As **) xbt_dynar_get_ptr(path_src, index_src);
- current_dst = (As **) xbt_dynar_get_ptr(path_dst, index_dst);
+ while (path_src.size() > 1 && path_dst.size() >1
+ && path_src.at(path_src.size() -1) == path_dst.at(path_dst.size() -1)) {
+ path_src.pop_back();
+ path_dst.pop_back();