summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_number.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_number.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_number.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/core/fpdfapi/parser/cpdf_number.cpp b/core/fpdfapi/parser/cpdf_number.cpp
index 24665fff60..73d689fffe 100644
--- a/core/fpdfapi/parser/cpdf_number.cpp
+++ b/core/fpdfapi/parser/cpdf_number.cpp
@@ -56,14 +56,7 @@ CFX_ByteString CPDF_Number::GetString() const {
: CFX_ByteString::FormatFloat(m_Float);
}
-bool CPDF_Number::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_Number::WriteTo(IFX_ArchiveStream* archive) const {
+ return archive->WriteString(" ") &&
+ archive->WriteString(GetString().AsStringC());
}