summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_reference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_reference.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_reference.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/core/fpdfapi/parser/cpdf_reference.cpp b/core/fpdfapi/parser/cpdf_reference.cpp
index 560fd27934..ff0442b6f5 100644
--- a/core/fpdfapi/parser/cpdf_reference.cpp
+++ b/core/fpdfapi/parser/cpdf_reference.cpp
@@ -83,15 +83,7 @@ CPDF_Object* CPDF_Reference::GetDirect() const {
: nullptr;
}
-bool CPDF_Reference::WriteTo(CFX_FileBufferArchive* archive,
- FX_FILESIZE* offset) const {
- if (archive->AppendString(" ") < 0)
- return false;
- int32_t len = archive->AppendDWord(GetRefObjNum());
- if (len < 0)
- return false;
- if (archive->AppendString(" 0 R ") < 0)
- return false;
- *offset += len + 6;
- return true;
+bool CPDF_Reference::WriteTo(IFX_ArchiveStream* archive) const {
+ return archive->WriteString(" ") && archive->WriteDWord(GetRefObjNum()) &&
+ archive->WriteString(" 0 R ");
}