diff options
author | Jeffrey Walton <noloader@gmail.com> | 2015-07-26 16:03:14 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2015-07-26 16:03:14 -0400 |
commit | b7de164d6251dc066123b59bc15d30c74e920756 (patch) | |
tree | 650e67242386d55616a2038c5cbc7042568ed377 /basecode.cpp | |
parent | 7b64ca489a7e1da36b02b4a35d149275914d8268 (diff) | |
download | cryptopp-git-b7de164d6251dc066123b59bc15d30c74e920756.tar.gz |
Cut-in CRYPTOPP_ASSERT in all remaining header and source files
Diffstat (limited to 'basecode.cpp')
-rw-r--r-- | basecode.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/basecode.cpp b/basecode.cpp index 864b5f9f..3cac35f6 100644 --- a/basecode.cpp +++ b/basecode.cpp @@ -54,7 +54,7 @@ size_t BaseN_Encoder::Put2(const byte *begin, size_t length, int messageEnd, boo unsigned int b = begin[m_inputPosition++], bitsLeftInSource = 8; while (true) { - assert(m_bitPos < m_bitsPerChar); + CRYPTOPP_ASSERT(m_bitPos < m_bitsPerChar); unsigned int bitsLeftInTarget = m_bitsPerChar-m_bitPos; m_outBuf[m_bytePos] |= b >> (8-bitsLeftInTarget); if (bitsLeftInSource >= bitsLeftInTarget) @@ -75,13 +75,13 @@ size_t BaseN_Encoder::Put2(const byte *begin, size_t length, int messageEnd, boo } } - assert(m_bytePos <= m_outputBlockSize); + CRYPTOPP_ASSERT(m_bytePos <= m_outputBlockSize); if (m_bytePos == m_outputBlockSize) { int i; for (i=0; i<m_bytePos; i++) { - assert(m_outBuf[i] < (1 << m_bitsPerChar)); + CRYPTOPP_ASSERT(m_outBuf[i] < (1 << m_bitsPerChar)); m_outBuf[i] = m_alphabet[m_outBuf[i]]; } FILTER_OUTPUT(1, m_outBuf, m_outputBlockSize, 0); @@ -180,14 +180,14 @@ void BaseN_Decoder::InitializeDecodingLookupArray(int *lookup, const byte *alpha { if (caseInsensitive && isalpha(alphabet[i])) { - assert(lookup[toupper(alphabet[i])] == -1); + CRYPTOPP_ASSERT(lookup[toupper(alphabet[i])] == -1); lookup[toupper(alphabet[i])] = i; - assert(lookup[tolower(alphabet[i])] == -1); + CRYPTOPP_ASSERT(lookup[tolower(alphabet[i])] == -1); lookup[tolower(alphabet[i])] = i; } else { - assert(lookup[alphabet[i]] == -1); + CRYPTOPP_ASSERT(lookup[alphabet[i]] == -1); lookup[alphabet[i]] = i; } } |