Browse Source

Applying rule of three on string types by removing redundant destructor and copy constructor.

David Piuva 10 months ago
parent
commit
6bf6321206
2 changed files with 0 additions and 5 deletions
  1. 0 2
      Source/DFPSR/api/stringAPI.cpp
  2. 0 3
      Source/DFPSR/api/stringAPI.h

+ 0 - 2
Source/DFPSR/api/stringAPI.cpp

@@ -73,8 +73,6 @@ ReadableString::ReadableString(const String& source)
 String::String() {}
 String::String(const char* source) { atomic_append_ascii(*this, source); }
 String::String(const DsrChar* source) { atomic_append_utf32(*this, source); }
-String::String(const String& source)
-: ReadableString(source.characters, source.view){}
 String::String(const ReadableString& source)
 : ReadableString(source.characters, source.view) {}
 

+ 0 - 3
Source/DFPSR/api/stringAPI.h

@@ -123,8 +123,6 @@ public:
 	: characters(characters), view(view) {}
 	// Create from String by sharing the buffer
 	ReadableString(const String& source);
-	// Destructor
-	~ReadableString() {} // Do not override the non-virtual destructor.
 };
 
 // A safe and simple string type
@@ -143,7 +141,6 @@ public:
 	String(const char* source);
 	String(const DsrChar* source);
 	String(const ReadableString& source);
-	String(const String& source);
 };
 
 // Used as format tags around numbers passed to string_append or string_combine