From f172290a8dc527cd8bc73b0d0ad59e78797968c1 Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 8 Apr 2016 12:13:50 -0700 Subject: Remove CFX_ByteString::Load() and operator= for CFX_ByteTextBuf The few places these are called are better served by explicit calls to CFX_ByteString() itself. This helps make Byte and Wide strings more similar. Also prevents fx_string.h from having any knowledge of fx_basic.h's ByteTextBuf class. Review URL: https://codereview.chromium.org/1870043003 --- core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_parser') diff --git a/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp b/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp index 46384244e8..6bfe1b60b3 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_standard_crypto_handler.cpp @@ -20,9 +20,9 @@ void IPDF_CryptoHandler::Decrypt(uint32_t objnum, CFX_ByteString& str) { CFX_BinaryBuf dest_buf; void* context = DecryptStart(objnum, gennum); - DecryptStream(context, (const uint8_t*)str, str.GetLength(), dest_buf); + DecryptStream(context, str.raw_str(), str.GetLength(), dest_buf); DecryptFinish(context, dest_buf); - str = dest_buf; + str = CFX_ByteString(dest_buf.GetBuffer(), dest_buf.GetSize()); } void CPDF_StandardCryptoHandler::CryptBlock(FX_BOOL bEncrypt, -- cgit v1.2.3