diff --git a/include/docpp.hpp b/include/docpp.hpp index a09031e..d389a2e 100644 --- a/include/docpp.hpp +++ b/include/docpp.hpp @@ -349,7 +349,6 @@ namespace docpp { bool empty() const; Property& operator=(const Property& property); - Property& operator=(const std::pair& property); bool operator==(const Property& property) const; bool operator!=(const Property& property) const; @@ -1189,11 +1188,6 @@ namespace docpp { * @param value The value of the property */ Property(const std::string& key, const std::string& value) : property(std::make_pair(key, value)) {}; - /** - * @brief Construct a new Property object - * @param property The property to set - */ - explicit Property(const std::pair& property) : property(property) {}; /** * @brief Construct a new Property object */ @@ -1262,11 +1256,6 @@ namespace docpp { * @param value The value. */ void set_value(const std::string& value); - /** - * @brief Set the property - * @param property The property. - */ - void set(const std::pair& property); /** * @brief Set the property * @param key The key of the property @@ -1275,7 +1264,6 @@ namespace docpp { void set(const std::string& key, const std::string& value); Property& operator=(const Property& property); - Property& operator=(const std::pair& property); bool operator==(const Property& property) const; bool operator!=(const Property& property) const; }; diff --git a/src/docpp.cpp b/src/docpp.cpp index 318205e..0a0adf1 100644 --- a/src/docpp.cpp +++ b/src/docpp.cpp @@ -39,11 +39,6 @@ docpp::HTML::Property& docpp::HTML::Property::operator=(const docpp::HTML::Prope return *this; } -docpp::HTML::Property& docpp::HTML::Property::operator=(const std::pair& property) { - this->set(property); - return *this; -} - bool docpp::HTML::Property::operator==(const docpp::HTML::Property& property) const { return this->property == property.get(); } @@ -1012,21 +1007,12 @@ void docpp::CSS::Property::set_value(const std::string& value) { this->property.second = value; } -void docpp::CSS::Property::set(const std::pair& property) { - this->property = property; -} - void docpp::CSS::Property::set(const std::string& key, const std::string& value) { this->property = std::make_pair(key, value); } docpp::CSS::Property& docpp::CSS::Property::operator=(const docpp::CSS::Property& property) { - this->set(property.get()); - return *this; -} - -docpp::CSS::Property& docpp::CSS::Property::operator=(const std::pair& property) { - this->set(property); + this->set(property.get().first, property.get().second); return *this; }