Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove duplicated element to math python3 runtime
  • Loading branch information
Thomasb81 committed Jul 7, 2024
1 parent b3bb743 commit a3bc940
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/Cpp/runtime/src/tree/xpath/XPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,13 @@ std::vector<ParseTree *> XPath::evaluate(ParseTree *t) {
}
}
i++;
work = next;
// remove duplicated element
work.clear();
for (unsigned int i=0; i < next.size(); i++ ){
if (std::find(work.begin(),work.end(),next[i]) == std::end(work)) {
work.push_back(next[i]);
}
}
}

return work;
Expand Down

0 comments on commit a3bc940

Please sign in to comment.