summaryrefslogtreecommitdiff
path: root/core/fxcrt/bytestring.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-19 14:37:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-19 14:37:12 +0000
commita1ea4276f87f945dfe922f7c37c08f2d203e4e59 (patch)
tree125f9e604c64f1bd38f8ff44d8784b062f0245c4 /core/fxcrt/bytestring.h
parentee3e3a4f3cbaa99ae3609f575ff9b2c329c5df2a (diff)
downloadpdfium-a1ea4276f87f945dfe922f7c37c08f2d203e4e59.tar.xz
fxcrt::{Byte,Wide}String missing move-assign operator
This hasn't been a big deal, since no data is copied, but avoids some ref-count churn in the process. Change-Id: I53c059284aa6806793c59a0c19b3e0d7fe4191d6 Reviewed-on: https://pdfium-review.googlesource.com/35350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/bytestring.h')
-rw-r--r--core/fxcrt/bytestring.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fxcrt/bytestring.h b/core/fxcrt/bytestring.h
index 99b87b1d4c..5722c4925d 100644
--- a/core/fxcrt/bytestring.h
+++ b/core/fxcrt/bytestring.h
@@ -21,6 +21,7 @@
namespace fxcrt {
+class ByteString_Assign_Test;
class ByteString_Concat_Test;
class StringPool_ByteString_Test;
class WideString;
@@ -133,7 +134,8 @@ class ByteString {
const ByteString& operator=(const char* str);
const ByteString& operator=(const ByteStringView& bstrc);
- const ByteString& operator=(const ByteString& stringSrc);
+ const ByteString& operator=(const ByteString& that);
+ const ByteString& operator=(ByteString&& that);
const ByteString& operator+=(char ch);
const ByteString& operator+=(const char* str);
@@ -209,9 +211,11 @@ class ByteString {
void AllocCopy(ByteString& dest, size_t nCopyLen, size_t nCopyIndex) const;
void AssignCopy(const char* pSrcData, size_t nSrcLen);
void Concat(const char* lpszSrcData, size_t nSrcLen);
+ intptr_t ReferenceCountForTesting() const;
RetainPtr<StringData> m_pData;
+ friend ByteString_Assign_Test;
friend ByteString_Concat_Test;
friend class StringPool_ByteString_Test;
};