summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_psengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_psengine.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_psengine.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_psengine.cpp b/core/fpdfapi/page/cpdf_psengine.cpp
index 7ce3a604a1..adfd45e877 100644
--- a/core/fpdfapi/page/cpdf_psengine.cpp
+++ b/core/fpdfapi/page/cpdf_psengine.cpp
@@ -190,10 +190,9 @@ int CPDF_PSEngine::PopInt() {
return static_cast<int>(Pop());
}
-bool CPDF_PSEngine::Parse(const char* str, int size) {
- CPDF_SimpleParser parser(reinterpret_cast<const uint8_t*>(str), size);
- ByteStringView word = parser.GetWord();
- return word == "{" ? m_MainProc.Parse(&parser, 0) : false;
+bool CPDF_PSEngine::Parse(const ByteStringView& view) {
+ CPDF_SimpleParser parser(view);
+ return parser.GetWord() == "{" && m_MainProc.Parse(&parser, 0);
}
bool CPDF_PSEngine::DoOperator(PDF_PSOP op) {