summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_simple_parser.h
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/parser/cpdf_simple_parser.h
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/parser/cpdf_simple_parser.h')
-rw-r--r--core/fpdfapi/parser/cpdf_simple_parser.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_simple_parser.h b/core/fpdfapi/parser/cpdf_simple_parser.h
index 72cf700f60..659039e6fa 100644
--- a/core/fpdfapi/parser/cpdf_simple_parser.h
+++ b/core/fpdfapi/parser/cpdf_simple_parser.h
@@ -7,6 +7,8 @@
#ifndef CORE_FPDFAPI_PARSER_CPDF_SIMPLE_PARSER_H_
#define CORE_FPDFAPI_PARSER_CPDF_SIMPLE_PARSER_H_
+#include <utility>
+
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
@@ -25,7 +27,7 @@ class CPDF_SimpleParser {
uint32_t GetCurPos() const { return m_dwCurPos; }
private:
- void ParseWord(const uint8_t*& pStart, uint32_t& dwSize);
+ std::pair<const uint8_t*, uint32_t> ParseWord();
const uint8_t* m_pData;
uint32_t m_dwSize;