summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-08 19:26:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-08 19:26:37 +0000
commit55bbb0a2e7a95bf2c08cbd1d7f1563aec7e5b97d (patch)
tree547f7890311e47df663676299d587fef7236aecb /fpdfsdk/cpdfsdk_helpers.h
parent9c6204fc6c23ab35ec234781df182da570f6faef (diff)
downloadpdfium-55bbb0a2e7a95bf2c08cbd1d7f1563aec7e5b97d.tar.xz
Mark CPDF_Object pointers as const in CPDF_ViewerPreferences.
Work up the short call stack and mark FPDF_PAGERANGE as an opaque const pointer. Also fix CPDF_ViewerPreferences::GenericName() to return an optional string. Change-Id: I2356d38888fcff8d4da37dd3efc17b284ff90485 Reviewed-on: https://pdfium-review.googlesource.com/32174 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.h')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.h b/fpdfsdk/cpdfsdk_helpers.h
index 0cd2617412..214fa72ab1 100644
--- a/fpdfsdk/cpdfsdk_helpers.h
+++ b/fpdfsdk/cpdfsdk_helpers.h
@@ -154,11 +154,11 @@ inline const CPDF_ContentMarkItem* CPDFContentMarkItemFromFPDFPageObjectMark(
return reinterpret_cast<const CPDF_ContentMarkItem*>(mark);
}
-inline FPDF_PAGERANGE FPDFPageRangeFromCPDFArray(CPDF_Array* range) {
+inline FPDF_PAGERANGE FPDFPageRangeFromCPDFArray(const CPDF_Array* range) {
return reinterpret_cast<FPDF_PAGERANGE>(range);
}
-inline CPDF_Array* CPDFArrayFromFPDFPageRange(FPDF_PAGERANGE range) {
- return reinterpret_cast<CPDF_Array*>(range);
+inline const CPDF_Array* CPDFArrayFromFPDFPageRange(FPDF_PAGERANGE range) {
+ return reinterpret_cast<const CPDF_Array*>(range);
}
inline FPDF_PATHSEGMENT FPDFPathSegmentFromFXPathPoint(