summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_creator.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-04-05 19:09:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-05 19:09:10 +0000
commit2cc287aec96752d8c36b4178bb75f737842b649b (patch)
tree84a9dac52899f9d36c798f47ad0b1ee3960aaaba /core/fpdfapi/edit/cpdf_creator.cpp
parent4a8478efac2c6b8642298b1e0f2c83247a569cb1 (diff)
downloadpdfium-2cc287aec96752d8c36b4178bb75f737842b649b.tar.xz
Get rid of a const_cast in CPDF_FlateEncoder.
Change-Id: I3ee8f8e9eb33d251dc00336bcd31e578e7ce5143 Reviewed-on: https://pdfium-review.googlesource.com/29854 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_creator.cpp')
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index 5868c979f2..adf507f844 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -224,7 +224,8 @@ bool CPDF_Creator::WriteDirectObj(uint32_t objnum,
break;
}
CPDF_Encryptor encryptor(GetCryptoHandler(), objnum,
- (uint8_t*)str.c_str(), str.GetLength());
+ reinterpret_cast<const uint8_t*>(str.c_str()),
+ str.GetLength());
ByteString content = PDF_EncodeString(
ByteString(encryptor.GetData(), encryptor.GetSize()), bHex);
if (!m_Archive->WriteString(content.AsStringView()))