!3106 Optimization for map_data_.clear()

Merge pull request !3106 from Kang/optimization
pull/3106/MERGE
mindspore-ci-bot 5 years ago committed by Gitee
commit b02fd3d8bc

@ -88,7 +88,9 @@ class OrderedMap {
}
void clear() {
if (!map_data_.empty()) {
map_data_.clear();
}
sequential_data_.clear();
}

@ -127,7 +127,9 @@ class OrderedSet {
// Clear the elements
void clear() {
if (!mapped_data_.empty()) {
mapped_data_.clear();
}
ordered_data_.clear();
}

Loading…
Cancel
Save