From 109aa6d0f673aee11a398aae478fb758fc73a33f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 20 Sep 2018 01:21:05 +0000 Subject: Remove more unneeded STL #includes from headers. Remove some variables named "string" to avoid false positives from the linter. Change-Id: I00a53e6970451fd0cea8ab2f8178183650ca00d2 Reviewed-on: https://pdfium-review.googlesource.com/42810 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- fxjs/cjs_delaydata.h | 3 +-- fxjs/cjs_field.cpp | 6 +++--- fxjs/cjs_field.h | 2 +- fxjs/cjs_publicmethods.h | 5 ++--- fxjs/js_define.h | 1 - 5 files changed, 7 insertions(+), 10 deletions(-) (limited to 'fxjs') diff --git a/fxjs/cjs_delaydata.h b/fxjs/cjs_delaydata.h index deeb65d56f..f4c7820143 100644 --- a/fxjs/cjs_delaydata.h +++ b/fxjs/cjs_delaydata.h @@ -7,7 +7,6 @@ #ifndef FXJS_CJS_DELAYDATA_H_ #define FXJS_CJS_DELAYDATA_H_ -#include #include #include "core/fxcrt/fx_coordinates.h" @@ -24,7 +23,7 @@ struct CJS_DelayData { WideString sFieldName; int32_t num; bool b; - ByteString string; + ByteString bytestring; WideString widestring; CFX_FloatRect rect; CFX_Color color; diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp index 1f390519fd..45baf613b0 100644 --- a/fxjs/cjs_field.cpp +++ b/fxjs/cjs_field.cpp @@ -2608,10 +2608,10 @@ void CJS_Field::AddDelay_Bool(FIELD_PROP prop, bool b) { m_pJSDoc->AddDelayData(std::move(pNewData)); } -void CJS_Field::AddDelay_String(FIELD_PROP prop, const ByteString& string) { +void CJS_Field::AddDelay_String(FIELD_PROP prop, const ByteString& str) { auto pNewData = pdfium::MakeUnique(prop, m_nFormControlIndex, m_FieldName); - pNewData->string = string; + pNewData->bytestring = str; m_pJSDoc->AddDelayData(std::move(pNewData)); } @@ -2644,7 +2644,7 @@ void CJS_Field::DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv, switch (pData->eProp) { case FP_BORDERSTYLE: SetBorderStyle(pFormFillEnv, pData->sFieldName, pData->nControlIndex, - pData->string); + pData->bytestring); break; case FP_CURRENTVALUEINDICES: SetCurrentValueIndices(pFormFillEnv, pData->sFieldName, diff --git a/fxjs/cjs_field.h b/fxjs/cjs_field.h index 4f2171017d..d4abb693bf 100644 --- a/fxjs/cjs_field.h +++ b/fxjs/cjs_field.h @@ -360,7 +360,7 @@ class CJS_Field final : public CJS_Object { void AddDelay_Int(FIELD_PROP prop, int32_t n); void AddDelay_Bool(FIELD_PROP prop, bool b); - void AddDelay_String(FIELD_PROP prop, const ByteString& string); + void AddDelay_String(FIELD_PROP prop, const ByteString& str); void AddDelay_Rect(FIELD_PROP prop, const CFX_FloatRect& rect); void AddDelay_WordArray(FIELD_PROP prop, const std::vector& array); void AddDelay_WideStringArray(FIELD_PROP prop, diff --git a/fxjs/cjs_publicmethods.h b/fxjs/cjs_publicmethods.h index f83375ca54..049fa681aa 100644 --- a/fxjs/cjs_publicmethods.h +++ b/fxjs/cjs_publicmethods.h @@ -7,7 +7,6 @@ #ifndef FXJS_CJS_PUBLICMETHODS_H_ #define FXJS_CJS_PUBLICMETHODS_H_ -#include #include #include "fxjs/js_define.h" @@ -137,11 +136,11 @@ class CJS_PublicMethods final : public CJS_Object { const v8::FunctionCallbackInfo& info); static const JSMethodSpec GlobalFunctionSpecs[]; - static int ParseStringInteger(const WideString& string, + static int ParseStringInteger(const WideString& str, size_t nStart, size_t* pSkip, size_t nMaxStep); - static WideString ParseStringString(const WideString& string, + static WideString ParseStringString(const WideString& str, size_t nStart, size_t* pSkip); static double ParseNormalDate(const WideString& value, bool* bWrongFormat); diff --git a/fxjs/js_define.h b/fxjs/js_define.h index 0d8c43f86e..9187e60e3f 100644 --- a/fxjs/js_define.h +++ b/fxjs/js_define.h @@ -7,7 +7,6 @@ #ifndef FXJS_JS_DEFINE_H_ #define FXJS_JS_DEFINE_H_ -#include #include #include "core/fxcrt/unowned_ptr.h" -- cgit v1.2.3