From 82aa396188ec26f22fe730f4e35b5a54ebffb5dc Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 20 Jan 2017 12:59:50 -0800 Subject: Replace CFX_ByteArray with CFX_ArrayTemplate Also replace CFX_Int32Array typedef with CFX_ArrayTemplate. Removing the typedefs makes subsequent conversion to std::vector<> easier on a case-by-case basis. Review-Url: https://codereview.chromium.org/2649563003 --- core/fxcrt/fx_arabic.cpp | 4 ++-- core/fxcrt/fx_arabic.h | 28 ++++++++++++++-------------- core/fxcrt/fx_basic.h | 5 ----- 3 files changed, 16 insertions(+), 21 deletions(-) (limited to 'core/fxcrt') diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp index d6b3c6522d..a649e49759 100644 --- a/core/fxcrt/fx_arabic.cpp +++ b/core/fxcrt/fx_arabic.cpp @@ -374,7 +374,7 @@ int32_t FX_BidiGetResolvedNeutrals(int32_t iAction) { int32_t FX_BidiReorderLevel(int32_t iBaseLevel, CFX_WideString& wsText, - const CFX_Int32Array& levels, + const CFX_ArrayTemplate& levels, int32_t iStart, bool bReverse) { ASSERT(iBaseLevel >= 0 && iBaseLevel <= FX_BIDIMAXLEVEL); @@ -403,7 +403,7 @@ int32_t FX_BidiReorderLevel(int32_t iBaseLevel, } void FX_BidiReorder(int32_t iBaseLevel, CFX_WideString& wsText, - const CFX_Int32Array& levels) { + const CFX_ArrayTemplate& levels) { ASSERT(iBaseLevel >= 0 && iBaseLevel <= FX_BIDIMAXLEVEL); ASSERT(wsText.GetLength() == levels.GetSize()); int32_t iSize = wsText.GetLength(); diff --git a/core/fxcrt/fx_arabic.h b/core/fxcrt/fx_arabic.h index 1f4d38b888..e7ba079f43 100644 --- a/core/fxcrt/fx_arabic.h +++ b/core/fxcrt/fx_arabic.h @@ -30,17 +30,17 @@ FX_WCHAR GetFormChar(const CFX_Char* cur, void FX_BidiReverseString(CFX_WideString& wsText, int32_t iStart, int32_t iCount); -void FX_BidiSetDeferredRun(CFX_Int32Array& values, +void FX_BidiSetDeferredRun(CFX_ArrayTemplate& values, int32_t iStart, int32_t iCount, int32_t iValue); void FX_BidiClassify(const CFX_WideString& wsText, - CFX_Int32Array& classes, + CFX_ArrayTemplate& classes, bool bWS = false); int32_t FX_BidiResolveExplicit(int32_t iBaseLevel, int32_t iDirection, - CFX_Int32Array& classes, - CFX_Int32Array& levels, + CFX_ArrayTemplate& classes, + CFX_ArrayTemplate& levels, int32_t iStart, int32_t iCount, int32_t iNest = 0); @@ -136,8 +136,8 @@ enum FX_BIDIWEAKACTION { #define FX_BWALxx FX_BIDIWEAKACTION_Lxx void FX_BidiResolveWeak(int32_t iBaseLevel, - CFX_Int32Array& classes, - CFX_Int32Array& levels); + CFX_ArrayTemplate& classes, + CFX_ArrayTemplate& levels); enum FX_BIDINEUTRALSTATE { FX_BIDINEUTRALSTATE_r = 0, FX_BIDINEUTRALSTATE_l, @@ -169,20 +169,20 @@ enum FX_BIDINEUTRALACTION { int32_t FX_BidiGetDeferredNeutrals(int32_t iAction, int32_t iLevel); int32_t FX_BidiGetResolvedNeutrals(int32_t iAction); void FX_BidiResolveNeutrals(int32_t iBaseLevel, - CFX_Int32Array& classes, - const CFX_Int32Array& levels); -void FX_BidiResolveImplicit(const CFX_Int32Array& classes, - CFX_Int32Array& levels); + CFX_ArrayTemplate& classes, + const CFX_ArrayTemplate& levels); +void FX_BidiResolveImplicit(const CFX_ArrayTemplate& classes, + CFX_ArrayTemplate& levels); void FX_BidiResolveWhitespace(int32_t iBaseLevel, - const CFX_Int32Array& classes, - CFX_Int32Array& levels); + const CFX_ArrayTemplate& classes, + CFX_ArrayTemplate& levels); int32_t FX_BidiReorderLevel(int32_t iBaseLevel, CFX_WideString& wsText, - const CFX_Int32Array& levels, + const CFX_ArrayTemplate& levels, int32_t iStart, bool bReverse = false); void FX_BidiReorder(int32_t iBaseLevel, CFX_WideString& wsText, - const CFX_Int32Array& levels); + const CFX_ArrayTemplate& levels); #endif // CORE_FXCRT_FX_ARABIC_H_ diff --git a/core/fxcrt/fx_basic.h b/core/fxcrt/fx_basic.h index 5adcf701c5..31850f5403 100644 --- a/core/fxcrt/fx_basic.h +++ b/core/fxcrt/fx_basic.h @@ -313,11 +313,6 @@ class CFX_ArrayTemplate : public CFX_BasicArray { } }; -#ifdef PDF_ENABLE_XFA -typedef CFX_ArrayTemplate CFX_ByteArray; -typedef CFX_ArrayTemplate CFX_Int32Array; -#endif // PDF_ENABLE_XFA - template class CFX_FixedBufGrow { public: -- cgit v1.2.3