diff options
Diffstat (limited to 'mqueue.cpp')
-rw-r--r-- | mqueue.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -13,7 +13,7 @@ MessageQueue::MessageQueue(unsigned int nodeSize) { } -unsigned int MessageQueue::CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end, const std::string &channel, bool blocking) const +size_t MessageQueue::CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end, const std::string &channel, bool blocking) const { if (begin >= MaxRetrievable()) return 0; @@ -21,10 +21,10 @@ unsigned int MessageQueue::CopyRangeTo2(BufferedTransformation &target, unsigned return m_queue.CopyRangeTo2(target, begin, STDMIN(MaxRetrievable(), end), channel, blocking); } -unsigned int MessageQueue::TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel, bool blocking) +size_t MessageQueue::TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel, bool blocking) { transferBytes = STDMIN(MaxRetrievable(), transferBytes); - unsigned int blockedBytes = m_queue.TransferTo2(target, transferBytes, channel, blocking); + size_t blockedBytes = m_queue.TransferTo2(target, transferBytes, channel, blocking); m_lengths.front() -= transferBytes; return blockedBytes; } @@ -45,7 +45,7 @@ bool MessageQueue::GetNextMessage() unsigned int MessageQueue::CopyMessagesTo(BufferedTransformation &target, unsigned int count, const std::string &channel) const { ByteQueue::Walker walker(m_queue); - std::deque<unsigned long>::const_iterator it = m_lengths.begin(); + std::deque<lword>::const_iterator it = m_lengths.begin(); unsigned int i; for (i=0; i<count && it != --m_lengths.end(); ++i, ++it) { @@ -62,10 +62,10 @@ void MessageQueue::swap(MessageQueue &rhs) m_lengths.swap(rhs.m_lengths); } -const byte * MessageQueue::Spy(unsigned int &contiguousSize) const +const byte * MessageQueue::Spy(size_t &contiguousSize) const { const byte *result = m_queue.Spy(contiguousSize); - contiguousSize = (unsigned int)STDMIN((unsigned long)contiguousSize, MaxRetrievable()); + contiguousSize = UnsignedMin(contiguousSize, MaxRetrievable()); return result; } @@ -81,7 +81,7 @@ unsigned int EqualityComparisonFilter::MapChannel(const std::string &channel) co return 2; } -unsigned int EqualityComparisonFilter::ChannelPut2(const std::string &channel, const byte *inString, unsigned int length, int messageEnd, bool blocking) +size_t EqualityComparisonFilter::ChannelPut2(const std::string &channel, const byte *inString, size_t length, int messageEnd, bool blocking) { if (!blocking) throw BlockingInputOnly("EqualityComparisonFilter"); @@ -101,7 +101,7 @@ unsigned int EqualityComparisonFilter::ChannelPut2(const std::string &channel, c while (length > 0 && q2.AnyRetrievable()) { - unsigned int len = length; + size_t len = length; const byte *data = q2.Spy(len); len = STDMIN(len, length); if (memcmp(inString, data, len) != 0) |