summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_contentmark.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-11-21 22:07:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-21 22:07:50 +0000
commit56e04d2656bdd5f2b9448d857e8e73ab16aadf8e (patch)
tree57ed8ebed62f498bdd1fe010b0909f162bbcd29c /core/fpdfapi/page/cpdf_contentmark.cpp
parentebe865db548f768038186054fc0f1eb024565c43 (diff)
downloadpdfium-56e04d2656bdd5f2b9448d857e8e73ab16aadf8e.tar.xz
Avoid passing pointers by reference in core.
This gets rid of most core/ non-const ref passing, either by passing by pointer-to-pointer instead, or by returning std::pair. Change-Id: Id7bdc355a1a725a05f9fa2f1e982ca8c975beef1 Reviewed-on: https://pdfium-review.googlesource.com/19030 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentmark.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_contentmark.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_contentmark.cpp b/core/fpdfapi/page/cpdf_contentmark.cpp
index 7d411b2084..cf8e37ec75 100644
--- a/core/fpdfapi/page/cpdf_contentmark.cpp
+++ b/core/fpdfapi/page/cpdf_contentmark.cpp
@@ -61,7 +61,7 @@ bool CPDF_ContentMark::HasMark(const ByteStringView& mark) const {
}
bool CPDF_ContentMark::LookupMark(const ByteStringView& mark,
- CPDF_Dictionary*& pDict) const {
+ CPDF_Dictionary** pDict) const {
const MarkData* pData = m_Ref.GetObject();
if (!pData)
return false;
@@ -69,7 +69,7 @@ bool CPDF_ContentMark::LookupMark(const ByteStringView& mark,
for (int i = 0; i < pData->CountItems(); i++) {
const CPDF_ContentMarkItem& item = pData->GetItem(i);
if (item.GetName() == mark) {
- pDict = item.GetParam();
+ *pDict = item.GetParam();
return true;
}
}