summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_boolean.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_boolean.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_boolean.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/core/fpdfapi/parser/cpdf_boolean.cpp b/core/fpdfapi/parser/cpdf_boolean.cpp
index 1cee3a3a49..eb01c06332 100644
--- a/core/fpdfapi/parser/cpdf_boolean.cpp
+++ b/core/fpdfapi/parser/cpdf_boolean.cpp
@@ -45,14 +45,7 @@ const CPDF_Boolean* CPDF_Boolean::AsBoolean() const {
return this;
}
-bool CPDF_Boolean::WriteTo(CFX_FileBufferArchive* archive,
- FX_FILESIZE* offset) const {
- if (archive->AppendString(" ") < 0)
- return false;
-
- int32_t len = archive->AppendString(GetString().AsStringC());
- if (len < 0)
- return false;
- *offset += len + 1;
- return true;
+bool CPDF_Boolean::WriteTo(IFX_ArchiveStream* archive) const {
+ return archive->WriteString(" ") &&
+ archive->WriteString(GetString().AsStringC());
}