diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-27 10:53:11 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-27 16:11:38 +0000 |
commit | 875e98c581952478f3a3ccef9b2f2e3ed06c5346 (patch) | |
tree | 8e0d7e032056bf4c73d6da43c0f3ce4eadb74dfd /fpdfsdk/cpdfsdk_interform.cpp | |
parent | cc3a3ee3ebcc1baabdfa7ffca5876dbbfa3980c1 (diff) | |
download | pdfium-875e98c581952478f3a3ccef9b2f2e3ed06c5346.tar.xz |
Remove FX_STRSIZE and replace with size_t
BUG=pdfium:828
Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16
Reviewed-on: https://pdfium-review.googlesource.com/13230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index fd0dffadba..635655c033 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -442,7 +442,7 @@ bool CPDFSDK_InterForm::SubmitFields(const WideString& csDestination, bool bUrlEncoded) { ByteString textBuf = ExportFieldsToFDFTextBuf(fields, bIncludeOrExclude); - FX_STRSIZE nBufSize = textBuf.GetLength(); + size_t nBufSize = textBuf.GetLength(); if (nBufSize == 0) return false; @@ -465,8 +465,7 @@ bool CPDFSDK_InterForm::SubmitFields(const WideString& csDestination, return true; } -bool CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, - FX_STRSIZE& nBufSize) { +bool CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, size_t& nBufSize) { std::unique_ptr<CFDF_Document> pFDF = CFDF_Document::ParseMemory(pBuf, nBufSize); if (!pFDF) @@ -538,14 +537,14 @@ bool CPDFSDK_InterForm::SubmitForm(const WideString& sDestination, ByteString fdfBuffer = pFDFDoc->WriteToString(); - FX_STRSIZE nBufSize = fdfBuffer.GetLength(); - if (nBufSize == 0) + if (fdfBuffer.IsEmpty()) return false; - uint8_t* pLocalBuffer = FX_Alloc(uint8_t, nBufSize); - memcpy(pLocalBuffer, fdfBuffer.c_str(), nBufSize); + uint8_t* pLocalBuffer = FX_Alloc(uint8_t, fdfBuffer.GetLength()); + memcpy(pLocalBuffer, fdfBuffer.c_str(), fdfBuffer.GetLength()); uint8_t* pBuffer = pLocalBuffer; + size_t nBufSize = fdfBuffer.GetLength(); if (bUrlEncoded && !FDFToURLEncodedData(pBuffer, nBufSize)) { FX_Free(pLocalBuffer); return false; |