BString: make move constructor and assignment noexcept
Change-Id: I87f5ecad22f46b59386a091a1bb502536f460315
This commit is contained in:
@@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
/*!
|
/*!
|
||||||
\fn BString::BString(BString&& string)
|
\fn BString::BString(BString&& string) noexcept
|
||||||
\brief Move the data from the \a string to this object.
|
\brief Move the data from the \a string to this object.
|
||||||
|
|
||||||
Create a new string object with the data of another \a string. The
|
Create a new string object with the data of another \a string. The
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
/*!
|
/*!
|
||||||
\fn BString& BString::operator=(BString&& string)
|
\fn BString& BString::operator=(BString&& string) noexcept
|
||||||
\brief Move the contents of \a string to this BString object.
|
\brief Move the contents of \a string to this BString object.
|
||||||
|
|
||||||
The \a string will no longer point to the same contents.
|
The \a string will no longer point to the same contents.
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public:
|
|||||||
BString(const BString& string);
|
BString(const BString& string);
|
||||||
BString(const char* string, int32 maxLength);
|
BString(const char* string, int32 maxLength);
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
BString(BString&& string);
|
BString(BString&& string) noexcept;
|
||||||
#endif
|
#endif
|
||||||
~BString();
|
~BString();
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
BString& operator=(const char* string);
|
BString& operator=(const char* string);
|
||||||
BString& operator=(char c);
|
BString& operator=(char c);
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
BString& operator=(BString&& string);
|
BString& operator=(BString&& string) noexcept;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BString& SetTo(const char* string);
|
BString& SetTo(const char* string);
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ BString::BString(const char* string, int32 maxLength)
|
|||||||
|
|
||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
BString::BString(BString&& string)
|
BString::BString(BString&& string) noexcept
|
||||||
{
|
{
|
||||||
fPrivateData = string.fPrivateData;
|
fPrivateData = string.fPrivateData;
|
||||||
string.fPrivateData = NULL;
|
string.fPrivateData = NULL;
|
||||||
@@ -273,7 +273,7 @@ BString::operator=(char c)
|
|||||||
|
|
||||||
#if __cplusplus >= 201103L
|
#if __cplusplus >= 201103L
|
||||||
BString&
|
BString&
|
||||||
BString::operator=(BString&& string)
|
BString::operator=(BString&& string) noexcept
|
||||||
{
|
{
|
||||||
if (this != &string) {
|
if (this != &string) {
|
||||||
_ReleasePrivateData();
|
_ReleasePrivateData();
|
||||||
|
|||||||
Reference in New Issue
Block a user