diff options
author | Lei Zhang <thestig@chromium.org> | 2018-04-17 16:16:39 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-17 16:16:39 +0000 |
commit | 8cfcb7da37352b22517892e6eabcedb77676cdf7 (patch) | |
tree | 4195ccdd962b1f5e1525d461c1b461b9f263a3cd /core/fpdfapi/page/cpdf_stitchfunc.h | |
parent | a4c7ac479d291fc3373b9c2f8f25302ecd53b0d5 (diff) | |
download | pdfium-8cfcb7da37352b22517892e6eabcedb77676cdf7.tar.xz |
Fix nits in CPDF_Function and derived classes.
- Switch away from FX_Alloc2D() when it is safe to do so.
- Use FX_SAFE_SIZE_T to avoid a potential underflow with FX_Realloc().
- Mark the v_Call() input as const.
- Check Call() and v_Call() return results.
Change-Id: I6ec3122b23e0f137f88aa8d85a9675154a1b1706
Reviewed-on: https://pdfium-review.googlesource.com/30802
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_stitchfunc.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_stitchfunc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_stitchfunc.h b/core/fpdfapi/page/cpdf_stitchfunc.h index 11396f12d7..1d11cb072b 100644 --- a/core/fpdfapi/page/cpdf_stitchfunc.h +++ b/core/fpdfapi/page/cpdf_stitchfunc.h @@ -20,7 +20,7 @@ class CPDF_StitchFunc : public CPDF_Function { // CPDF_Function bool v_Init(CPDF_Object* pObj, std::set<CPDF_Object*>* pVisited) override; - bool v_Call(float* inputs, float* results) const override; + bool v_Call(const float* inputs, float* results) const override; const std::vector<std::unique_ptr<CPDF_Function>>& GetSubFunctions() const { return m_pSubFunctions; |