mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-01-31 10:03:29 +00:00
Clear GCC warnings
This commit is contained in:
parent
ac73023362
commit
5a3a71c9a4
19
queue.cpp
19
queue.cpp
@ -11,7 +11,7 @@
|
||||
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
static const unsigned int s_maxAutoNodeSize = 16*1024;
|
||||
static const unsigned int s_maxAutoNodeSize = 16*1024u;
|
||||
|
||||
// this class for use by ByteQueue only
|
||||
class ByteQueueNode
|
||||
@ -136,8 +136,9 @@ public:
|
||||
// ********************************************************
|
||||
|
||||
ByteQueue::ByteQueue(size_t nodeSize)
|
||||
: Bufferless<BufferedTransformation>(), m_autoNodeSize(!nodeSize), m_nodeSize(nodeSize)
|
||||
, m_head(NULLPTR), m_tail(NULLPTR), m_lazyString(NULLPTR), m_lazyLength(0), m_lazyStringModifiable(false)
|
||||
: Bufferless<BufferedTransformation>()
|
||||
, m_head(NULLPTR), m_tail(NULLPTR), m_lazyString(NULLPTR), m_lazyLength(0)
|
||||
, m_nodeSize(nodeSize), m_lazyStringModifiable(false), m_autoNodeSize(!nodeSize)
|
||||
{
|
||||
// See GH #962 for the reason for this assert.
|
||||
CRYPTOPP_ASSERT(nodeSize != SIZE_MAX);
|
||||
@ -476,18 +477,18 @@ bool ByteQueue::operator==(const ByteQueue &rhs) const
|
||||
return true;
|
||||
}
|
||||
|
||||
byte ByteQueue::operator[](lword i) const
|
||||
byte ByteQueue::operator[](lword index) const
|
||||
{
|
||||
for (ByteQueueNode *current=m_head; current; current=current->m_next)
|
||||
{
|
||||
if (i < current->CurrentSize())
|
||||
return (*current)[(size_t)i];
|
||||
if (index < current->CurrentSize())
|
||||
return (*current)[(size_t)index];
|
||||
|
||||
i -= current->CurrentSize();
|
||||
index -= current->CurrentSize();
|
||||
}
|
||||
|
||||
CRYPTOPP_ASSERT(i < m_lazyLength);
|
||||
return m_lazyString[i];
|
||||
CRYPTOPP_ASSERT(index < m_lazyLength);
|
||||
return m_lazyString[index];
|
||||
}
|
||||
|
||||
void ByteQueue::swap(ByteQueue &rhs)
|
||||
|
4
queue.h
4
queue.h
@ -127,7 +127,7 @@ public:
|
||||
void FinalizeLazyPut();
|
||||
|
||||
/// \brief Assign contents from another ByteQueue
|
||||
/// \param t the other ByteQueue
|
||||
/// \param rhs the other ByteQueue
|
||||
/// \return reference to this ByteQueue
|
||||
ByteQueue & operator=(const ByteQueue &rhs);
|
||||
|
||||
@ -149,7 +149,7 @@ public:
|
||||
/// \param index of byte to retrieve
|
||||
/// \return byte at the specified index
|
||||
/// \details operator[]() does not perform bounds checking.
|
||||
byte operator[](lword i) const;
|
||||
byte operator[](lword index) const;
|
||||
|
||||
/// \brief Swap contents with another ByteQueue
|
||||
/// \param rhs the other SecBlock
|
||||
|
Loading…
x
Reference in New Issue
Block a user