summaryrefslogtreecommitdiff
path: root/core/fxge/dib/cstretchengine.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-10 20:03:34 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-10 20:03:34 +0000
commit994d8b4e363bb86128593a9000a17b0e79f849f5 (patch)
treed26a21bb890d3795e02a1b9502ce11ceea9ad3eb /core/fxge/dib/cstretchengine.h
parentf36a4644b828bd9ad214a42511af91b4a1073eea (diff)
downloadpdfium-994d8b4e363bb86128593a9000a17b0e79f849f5.tar.xz
Remove const args and const_casts where not required.
Introduce const/non-const versions of method where required. Part of the war on const_cast<>. Tidy one expression to use [] instead of .data(). Change-Id: I41e45669c79eee242ff2244c7dc3afcf6386a433 Reviewed-on: https://pdfium-review.googlesource.com/39852 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge/dib/cstretchengine.h')
-rw-r--r--core/fxge/dib/cstretchengine.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/fxge/dib/cstretchengine.h b/core/fxge/dib/cstretchengine.h
index fa298f5376..c9f11d6006 100644
--- a/core/fxge/dib/cstretchengine.h
+++ b/core/fxge/dib/cstretchengine.h
@@ -46,7 +46,13 @@ class CStretchEngine {
int src_min,
int src_max,
int flags);
- PixelWeight* GetPixelWeight(int pixel) const;
+
+ const PixelWeight* GetPixelWeight(int pixel) const;
+ PixelWeight* GetPixelWeight(int pixel) {
+ return const_cast<PixelWeight*>(
+ static_cast<const CWeightTable*>(this)->GetPixelWeight(pixel));
+ }
+
int* GetValueFromPixelWeight(PixelWeight* pWeight, int index) const;
size_t GetPixelWeightSize() const;