From 4999f914be6c390bbc6d709c5b65d8955a827970 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Sat, 13 Jun 2015 00:31:30 -0700 Subject: Merge to XFA: Cleanup: Remove uses of "this->" in core/ R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1173223002. (cherry picked from commit 2b5e0d5b20654d116045484868c9e015ed698124) Review URL: https://codereview.chromium.org/1186673004. --- core/include/fpdfdoc/fpdf_vt.h | 50 +++++++++++++++++++------------------ core/include/fxcrt/fx_coordinates.h | 34 ++++++++++++++----------- core/include/fxcrt/fx_string.h | 4 +-- 3 files changed, 48 insertions(+), 40 deletions(-) (limited to 'core/include') diff --git a/core/include/fpdfdoc/fpdf_vt.h b/core/include/fpdfdoc/fpdf_vt.h index 1fec0e629a..7dbd154e89 100644 --- a/core/include/fpdfdoc/fpdf_vt.h +++ b/core/include/fpdfdoc/fpdf_vt.h @@ -26,11 +26,13 @@ struct CPVT_WordPlace { { } - CPVT_WordPlace(int32_t nSecIndex, int32_t nLineIndex, int32_t nWordIndex) + CPVT_WordPlace(int32_t other_nSecIndex, + int32_t other_nLineIndex, + int32_t other_nWordIndex) { - this->nSecIndex = nSecIndex; - this->nLineIndex = nLineIndex; - this->nWordIndex = nWordIndex; + nSecIndex = other_nSecIndex; + nLineIndex = other_nLineIndex; + nWordIndex = other_nWordIndex; } void Default() @@ -40,32 +42,32 @@ struct CPVT_WordPlace { FX_BOOL operator == (const CPVT_WordPlace & wp) const { - return wp.nSecIndex == this->nSecIndex && wp.nLineIndex == this->nLineIndex && wp.nWordIndex == this->nWordIndex; + return wp.nSecIndex == nSecIndex && wp.nLineIndex == nLineIndex && wp.nWordIndex == nWordIndex; } FX_BOOL operator != (const CPVT_WordPlace & wp) const { - return wp.nSecIndex != this->nSecIndex || wp.nLineIndex != this->nLineIndex || wp.nWordIndex != this->nWordIndex; + return wp.nSecIndex != nSecIndex || wp.nLineIndex != nLineIndex || wp.nWordIndex != nWordIndex; } inline int32_t WordCmp(const CPVT_WordPlace & wp) const { - if (this->nSecIndex > wp.nSecIndex) { + if (nSecIndex > wp.nSecIndex) { return 1; } - if (this->nSecIndex < wp.nSecIndex) { + if (nSecIndex < wp.nSecIndex) { return -1; } - if (this->nLineIndex > wp.nLineIndex) { + if (nLineIndex > wp.nLineIndex) { return 1; } - if (this->nLineIndex < wp.nLineIndex) { + if (nLineIndex < wp.nLineIndex) { return -1; } - if (this->nWordIndex > wp.nWordIndex) { + if (nWordIndex > wp.nWordIndex) { return 1; } - if (this->nWordIndex < wp.nWordIndex) { + if (nWordIndex < wp.nWordIndex) { return -1; } return 0; @@ -73,16 +75,16 @@ struct CPVT_WordPlace { inline int32_t LineCmp(const CPVT_WordPlace & wp) const { - if (this->nSecIndex > wp.nSecIndex) { + if (nSecIndex > wp.nSecIndex) { return 1; } - if (this->nSecIndex < wp.nSecIndex) { + if (nSecIndex < wp.nSecIndex) { return -1; } - if (this->nLineIndex > wp.nLineIndex) { + if (nLineIndex > wp.nLineIndex) { return 1; } - if (this->nLineIndex < wp.nLineIndex) { + if (nLineIndex < wp.nLineIndex) { return -1; } return 0; @@ -90,10 +92,10 @@ struct CPVT_WordPlace { inline int32_t SecCmp(const CPVT_WordPlace & wp) const { - if (this->nSecIndex > wp.nSecIndex) { + if (nSecIndex > wp.nSecIndex) { return 1; } - if (this->nSecIndex < wp.nSecIndex) { + if (nSecIndex < wp.nSecIndex) { return -1; } return 0; @@ -124,31 +126,31 @@ struct CPVT_WordRange { void Set(const CPVT_WordPlace & begin, const CPVT_WordPlace & end) { - this->BeginPos = begin; - this->EndPos = end; + BeginPos = begin; + EndPos = end; SwapWordPlace(); } void SetBeginPos(const CPVT_WordPlace & begin) { - this->BeginPos = begin; + BeginPos = begin; SwapWordPlace(); } void SetEndPos(const CPVT_WordPlace & end) { - this->EndPos = end; + EndPos = end; SwapWordPlace(); } FX_BOOL IsExist() const { - return this->BeginPos != this->EndPos; + return BeginPos != EndPos; } FX_BOOL operator != (const CPVT_WordRange & wr) const { - return wr.BeginPos != this->BeginPos || wr.EndPos != this->EndPos; + return wr.BeginPos != BeginPos || wr.EndPos != EndPos; } void SwapWordPlace() diff --git a/core/include/fxcrt/fx_coordinates.h b/core/include/fxcrt/fx_coordinates.h index c98ece9e07..779f1722b2 100644 --- a/core/include/fxcrt/fx_coordinates.h +++ b/core/include/fxcrt/fx_coordinates.h @@ -694,21 +694,24 @@ public: top += y; } - void Inflate(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top) + void Inflate(FX_FLOAT other_left, + FX_FLOAT other_bottom, + FX_FLOAT other_right, + FX_FLOAT other_top) { Normalize(); - this->left -= left; - this->bottom -= bottom; - this->right += right; - this->top += top; + left -= other_left; + bottom -= other_bottom; + right += other_right; + top += other_top; } - void Inflate(const CFX_FloatRect &rt) + void Inflate(const CFX_FloatRect &rt) { Inflate(rt.left, rt.bottom, rt.right, rt.top); } - void Deflate(FX_FLOAT x, FX_FLOAT y) + void Deflate(FX_FLOAT x, FX_FLOAT y) { Normalize(); left += x; @@ -717,21 +720,24 @@ public: top -= y; } - void Deflate(FX_FLOAT left, FX_FLOAT bottom, FX_FLOAT right, FX_FLOAT top) + void Deflate(FX_FLOAT other_left, + FX_FLOAT other_bottom, + FX_FLOAT other_right, + FX_FLOAT other_top) { Normalize(); - this->left += left; - this->bottom += bottom; - this->right -= right; - this->top -= top; + left += other_left; + bottom += other_bottom; + right -= other_right; + top -= other_top; } - void Deflate(const CFX_FloatRect &rt) + void Deflate(const CFX_FloatRect &rt) { Deflate(rt.left, rt.bottom, rt.right, rt.top); } - void Translate(FX_FLOAT e, FX_FLOAT f) + void Translate(FX_FLOAT e, FX_FLOAT f) { left += e; right += e; diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index 48e0e51879..8d73555814 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -184,7 +184,7 @@ public: // Move constructor. inline CFX_ByteString(CFX_ByteString&& other) { - this->m_pData = other.m_pData; + m_pData = other.m_pData; other.m_pData = nullptr; } @@ -630,7 +630,7 @@ public: // Move constructor. inline CFX_WideString(CFX_WideString&& other) { - this->m_pData = other.m_pData; + m_pData = other.m_pData; other.m_pData = nullptr; } -- cgit v1.2.3