diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
commit | d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch) | |
tree | 4b03760892a97a9bc452ebe8b7793bbebd402ad4 /mqueue.cpp | |
parent | fa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff) | |
download | cryptopp-d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47.tar.gz |
port to MSVC .NET 2005 beta 2
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0
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) |