summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi/fpdf_resource.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-16 16:18:47 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-16 16:18:47 -0700
commitea44bd064a86679a47a7265020f997d6e3b88336 (patch)
treee74d7540d03da8250bcb2fbae087d0c9ddb94cef /core/include/fpdfapi/fpdf_resource.h
parent5fef754bc09e971f1bf1ba79da98c0a7ee1e1c8d (diff)
downloadpdfium-ea44bd064a86679a47a7265020f997d6e3b88336.tar.xz
Add constructor for CPDF_ColorSpace.
Prevents sub-classes from tweaking parent class instance vars. Also "fix" https://code.google.com/p/pdfium/issues/detail?id=170, assuming 0 is a good value. BUG=pdfium:170 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1185903002.
Diffstat (limited to 'core/include/fpdfapi/fpdf_resource.h')
-rw-r--r--core/include/fpdfapi/fpdf_resource.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/core/include/fpdfapi/fpdf_resource.h b/core/include/fpdfapi/fpdf_resource.h
index 19ba818180..a73b2cd1a2 100644
--- a/core/include/fpdfapi/fpdf_resource.h
+++ b/core/include/fpdfapi/fpdf_resource.h
@@ -637,11 +637,17 @@ public:
}
virtual void EnableStdConversion(FX_BOOL bEnabled);
- CPDF_Document* m_pDocument;
-protected:
- CPDF_ColorSpace();
+ CPDF_Document* const m_pDocument;
+protected:
+ CPDF_ColorSpace(CPDF_Document* pDoc, int family, int nComponents)
+ : m_pDocument(pDoc),
+ m_Family(family),
+ m_nComponents(nComponents),
+ m_pArray(nullptr),
+ m_dwStdConversion(0) {
+ }
virtual ~CPDF_ColorSpace() {}
virtual FX_BOOL v_Load(CPDF_Document* pDoc, CPDF_Array* pArray)
{