fix bug (found by Michael Hunley)
parent
1b953a6a6c
commit
cdcfe6b6af
|
|
@ -129,11 +129,18 @@ public:
|
|||
// ********************************************************
|
||||
|
||||
ByteQueue::ByteQueue(unsigned int nodeSize)
|
||||
: m_autoNodeSize(m_nodeSize==0), m_nodeSize(nodeSize ? nodeSize : 256), m_lazyLength(0)
|
||||
: m_lazyLength(0)
|
||||
{
|
||||
SetNodeSize(nodeSize);
|
||||
m_head = m_tail = new ByteQueueNode(m_nodeSize);
|
||||
}
|
||||
|
||||
void ByteQueue::SetNodeSize(unsigned int nodeSize)
|
||||
{
|
||||
m_autoNodeSize = !nodeSize;
|
||||
m_nodeSize = m_autoNodeSize ? 256 : nodeSize;
|
||||
}
|
||||
|
||||
ByteQueue::ByteQueue(const ByteQueue ©)
|
||||
{
|
||||
CopyFrom(copy);
|
||||
|
|
|
|||
4
queue.h
4
queue.h
|
|
@ -16,7 +16,7 @@ class ByteQueueNode;
|
|||
class CRYPTOPP_DLL ByteQueue : public Bufferless<BufferedTransformation>
|
||||
{
|
||||
public:
|
||||
ByteQueue(unsigned int m_nodeSize=0);
|
||||
ByteQueue(unsigned int nodeSize=0);
|
||||
ByteQueue(const ByteQueue ©);
|
||||
~ByteQueue();
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ public:
|
|||
unsigned int CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end=ULONG_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const;
|
||||
|
||||
// these member functions are not inherited
|
||||
void SetNodeSize(unsigned int nodeSize) {m_nodeSize = nodeSize;}
|
||||
void SetNodeSize(unsigned int nodeSize);
|
||||
|
||||
unsigned long CurrentSize() const;
|
||||
bool IsEmpty() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue