From 93a850649880cf8c18819fa91594ca02159cf0fe Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 30 Mar 2023 08:21:50 -0600 Subject: [PATCH] Let compiler generated special member functions --- include/SFML/System/String.hpp | 30 ------------------------------ src/SFML/System/String.cpp | 16 ---------------- 2 files changed, 46 deletions(-) diff --git a/include/SFML/System/String.hpp b/include/SFML/System/String.hpp index de753f3f..a217539d 100644 --- a/include/SFML/System/String.hpp +++ b/include/SFML/System/String.hpp @@ -151,26 +151,6 @@ public: //////////////////////////////////////////////////////////// String(const std::basic_string& utf32String); - //////////////////////////////////////////////////////////// - /// \brief Copy constructor - /// - /// \param copy Instance to copy - /// - //////////////////////////////////////////////////////////// - String(const String& copy); - - //////////////////////////////////////////////////////////// - /// \brief Move constructor - /// - //////////////////////////////////////////////////////////// - String(String&&) noexcept; - - //////////////////////////////////////////////////////////// - /// \brief Move assignment - /// - //////////////////////////////////////////////////////////// - String& operator=(String&&) noexcept; - //////////////////////////////////////////////////////////// /// \brief Create a new sf::String from a UTF-8 encoded string /// @@ -312,16 +292,6 @@ public: //////////////////////////////////////////////////////////// std::basic_string toUtf32() const; - //////////////////////////////////////////////////////////// - /// \brief Overload of assignment operator - /// - /// \param right Instance to assign - /// - /// \return Reference to self - /// - //////////////////////////////////////////////////////////// - String& operator=(const String& right); - //////////////////////////////////////////////////////////// /// \brief Overload of += operator to append an UTF-32 string /// diff --git a/src/SFML/System/String.cpp b/src/SFML/System/String.cpp index 64683b10..2524fbf2 100644 --- a/src/SFML/System/String.cpp +++ b/src/SFML/System/String.cpp @@ -123,18 +123,6 @@ String::String(const std::basic_string& utf32String) : m_string(u } -//////////////////////////////////////////////////////////// -String::String(const String& copy) = default; - - -//////////////////////////////////////////////////////////// -String::String(String&&) noexcept = default; - - -//////////////////////////////////////////////////////////// -String& String::operator=(String&&) noexcept = default; - - //////////////////////////////////////////////////////////// String::operator std::string() const { @@ -212,10 +200,6 @@ std::basic_string String::toUtf32() const } -//////////////////////////////////////////////////////////// -String& String::operator=(const String& right) = default; - - //////////////////////////////////////////////////////////// String& String::operator+=(const String& right) {