Remove early exit for empty containers

This commit is contained in:
Daniel James
2017-04-25 09:54:28 +01:00
parent 07b9a7d60e
commit 1c8edf0298

View File

@ -3107,14 +3107,9 @@ struct table : boost::unordered::detail::functions<typename Types::hasher,
mlf_ = x.mlf_;
recalculate_max_load();
if (!size_ && !x.size_) {
new_func_this.commit();
return;
}
if (x.size_ >= max_load_) {
create_buckets(min_buckets_for_size(x.size_));
} else {
} else if (size_) {
clear_buckets();
}
@ -3194,14 +3189,9 @@ struct table : boost::unordered::detail::functions<typename Types::hasher,
mlf_ = x.mlf_;
recalculate_max_load();
if (!size_ && !x.size_) {
new_func_this.commit();
return;
}
if (x.size_ >= max_load_) {
create_buckets(min_buckets_for_size(x.size_));
} else {
} else if (size_) {
clear_buckets();
}