diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index e1633364..c7b0b3ec 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -101,9 +101,7 @@ namespace boost { unordered_flat_map& operator=(unordered_flat_map const& other) { - if (this != &other) { - table_ = other.table_; - } + table_ = other.table_; return *this; } diff --git a/include/boost/unordered/unordered_flat_set.hpp b/include/boost/unordered/unordered_flat_set.hpp index 3f075185..b1caed49 100644 --- a/include/boost/unordered/unordered_flat_set.hpp +++ b/include/boost/unordered/unordered_flat_set.hpp @@ -100,9 +100,7 @@ namespace boost { unordered_flat_set& operator=(unordered_flat_set const& other) { - if (this != &other) { - table_ = other.table_; - } + table_ = other.table_; return *this; }