summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.h
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-10-18 15:38:23 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-18 15:38:23 -0700
commitf328d0d378b8df8a3416988d96c34f1d3f9d26d1 (patch)
tree5b25d16374b6895595a1cd914968196edbd6fa4b /fpdfsdk/javascript/Document.h
parent7c29e27dae139a205755c1a29b7f3ac8b36ec0da (diff)
downloadpdfium-f328d0d378b8df8a3416988d96c34f1d3f9d26d1.tar.xz
Make Document::m_IconList a vector of IconElements.
There's no need for std::list<std::unique_ptr<IconElement>>. Review-Url: https://codereview.chromium.org/2428743004
Diffstat (limited to 'fpdfsdk/javascript/Document.h')
-rw-r--r--fpdfsdk/javascript/Document.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/fpdfsdk/javascript/Document.h b/fpdfsdk/javascript/Document.h
index a72316c3d1..d7bf230346 100644
--- a/fpdfsdk/javascript/Document.h
+++ b/fpdfsdk/javascript/Document.h
@@ -18,7 +18,7 @@
class PrintParamsObj : public CJS_EmbedObj {
public:
- PrintParamsObj(CJS_Object* pJSObject);
+ explicit PrintParamsObj(CJS_Object* pJSObject);
~PrintParamsObj() override {}
public:
@@ -34,7 +34,8 @@ class PrintParamsObj : public CJS_EmbedObj {
class CJS_PrintParamsObj : public CJS_Object {
public:
- CJS_PrintParamsObj(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
+ explicit CJS_PrintParamsObj(v8::Local<v8::Object> pObject)
+ : CJS_Object(pObject) {}
~CJS_PrintParamsObj() override {}
DECLARE_JS_CLASS();
@@ -47,8 +48,8 @@ struct IconElement {
IconElement(const CFX_WideString& name, Icon* stream)
: IconName(name), IconStream(stream) {}
- CFX_WideString IconName;
- Icon* IconStream;
+ const CFX_WideString IconName;
+ Icon* const IconStream;
};
struct CJS_DelayData;
@@ -57,7 +58,7 @@ struct CJS_AnnotObj;
class Document : public CJS_EmbedObj {
public:
- Document(CJS_Object* pJSObject);
+ explicit Document(CJS_Object* pJSObject);
~Document() override;
FX_BOOL ADBE(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
@@ -291,7 +292,7 @@ class Document : public CJS_EmbedObj {
CPDFSDK_FormFillEnvironment::ObservedPtr m_pFormFillEnv;
CFX_WideString m_cwBaseURL;
std::list<std::unique_ptr<CJS_DelayData>> m_DelayData;
- std::list<std::unique_ptr<IconElement>> m_IconList;
+ std::vector<IconElement> m_Icons;
bool m_bDelay;
};