summaryrefslogtreecommitdiff
path: root/zdeflate.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2023-04-15 16:45:02 -0400
committerGitHub <noreply@github.com>2023-04-15 16:45:02 -0400
commitf5f63850f9a5521e45de3cc45be61309a2e71ab2 (patch)
treed9ec904ebd511ae673e89790a407f0cdcf0b9bbc /zdeflate.cpp
parent358d0cfecd593d55160df38e133b9450aaf1cd59 (diff)
downloadcryptopp-git-f5f63850f9a5521e45de3cc45be61309a2e71ab2.tar.gz
Use std namespace for memset, memcpy, memcmp (#1204)
Diffstat (limited to 'zdeflate.cpp')
-rw-r--r--zdeflate.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/zdeflate.cpp b/zdeflate.cpp
index 44413ab5..d681959d 100644
--- a/zdeflate.cpp
+++ b/zdeflate.cpp
@@ -352,7 +352,7 @@ unsigned int Deflator::FillWindow(const byte *str, size_t length)
if (m_blockStart < DSIZE)
EndBlock(false);
- memcpy(m_byteBuffer, m_byteBuffer + DSIZE, DSIZE);
+ std::memcpy(m_byteBuffer, m_byteBuffer + DSIZE, DSIZE);
m_dictionaryEnd = m_dictionaryEnd < DSIZE ? 0 : m_dictionaryEnd-DSIZE;
CRYPTOPP_ASSERT(m_stringStart >= DSIZE);
@@ -377,7 +377,7 @@ unsigned int Deflator::FillWindow(const byte *str, size_t length)
CRYPTOPP_ASSERT(maxBlockSize > m_stringStart+m_lookahead);
unsigned int accepted = UnsignedMin(maxBlockSize-(m_stringStart+m_lookahead), length);
CRYPTOPP_ASSERT(accepted > 0);
- memcpy(m_byteBuffer + m_stringStart + m_lookahead, str, accepted);
+ std::memcpy(m_byteBuffer + m_stringStart + m_lookahead, str, accepted);
m_lookahead += accepted;
return accepted;
}
@@ -689,8 +689,8 @@ void Deflator::EncodeBlock(bool eof, unsigned int blockType)
unsigned int hdist = (unsigned int)(FindIfNot(RevIt(distanceCodeLengths.end()), RevIt(distanceCodeLengths.begin()+1), 0).base() - (distanceCodeLengths.begin()+1));
SecBlockWithHint<unsigned int, 286+30> combinedLengths(hlit+257+hdist+1);
- memcpy(combinedLengths, literalCodeLengths, (hlit+257)*sizeof(unsigned int));
- memcpy(combinedLengths+hlit+257, distanceCodeLengths, (hdist+1)*sizeof(unsigned int));
+ std::memcpy(combinedLengths, literalCodeLengths, (hlit+257)*sizeof(unsigned int));
+ std::memcpy(combinedLengths+hlit+257, distanceCodeLengths, (hdist+1)*sizeof(unsigned int));
FixedSizeSecBlock<unsigned int, 19> codeLengthCodeCounts, codeLengthCodeLengths;
std::fill(codeLengthCodeCounts.begin(), codeLengthCodeCounts.end(), 0);