From 2763fba8755e3ef4bc15eb5c347ea2f291c6736a Mon Sep 17 00:00:00 2001 From: tsepez Date: Tue, 24 Jan 2017 10:50:20 -0800 Subject: Replace some loose (ptr, len) pairs with CFX_ByteStringC in fpdfapi. These separate scalars are an anti-pattern given the ability to pass a single entity and later operate on it sensibly. Review-Url: https://codereview.chromium.org/2652033002 --- core/fpdfapi/page/cpdf_streamcontentparser.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.h') diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h index 6429b02bbd..e23ae8ea99 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.h +++ b/core/fpdfapi/page/cpdf_streamcontentparser.h @@ -77,16 +77,16 @@ class CPDF_StreamContentParser { std::unordered_map; static OpCodes InitializeOpCodes(); - void AddNumberParam(const FX_CHAR* str, int len); + void AddNameParam(const CFX_ByteStringC& str); + void AddNumberParam(const CFX_ByteStringC& str); void AddObjectParam(std::unique_ptr pObj); - void AddNameParam(const FX_CHAR* name, int size); int GetNextParamPos(); void ClearAllParams(); CPDF_Object* GetObject(uint32_t index); CFX_ByteString GetString(uint32_t index); FX_FLOAT GetNumber(uint32_t index); int GetInteger(uint32_t index) { return (int32_t)(GetNumber(index)); } - void OnOperator(const FX_CHAR* op); + void OnOperator(const CFX_ByteStringC& op); void AddTextObject(CFX_ByteString* pText, FX_FLOAT fInitKerning, FX_FLOAT* pKerning, -- cgit v1.2.3