VS2010 doesn't know how to compute min(4096, size_t) :-P

master
Nat Goodspeed 2012-02-15 14:04:46 -05:00
parent 10ab4adc86
commit 9b02f483ff
1 changed files with 3 additions and 3 deletions

View File

@ -144,8 +144,8 @@ public:
{
// Copy data out from mStreambuf to a flat, contiguous buffer to
// write -- but only up to a certain size.
std::streamsize total(mStreambuf.size());
std::streamsize bufsize((std::min)(4096, total));
std::size_t total(mStreambuf.size());
std::size_t bufsize((std::min)(std::size_t(4096), total));
boost::asio::streambuf::const_buffers_type bufs = mStreambuf.data();
std::vector<char> buffer(
boost::asio::buffers_begin(bufs),
@ -241,7 +241,7 @@ private:
// Now that we've received new data, publish it on our
// LLEventPump as advertised. Constrain it by mLimit.
std::streamsize datasize((std::min)(mLimit, mStreambuf.size()));
std::size_t datasize((std::min)(mLimit, mStreambuf.size()));
boost::asio::streambuf::const_buffers_type cbufs = mStreambuf.data();
mPump.post(LLSDMap("data", LLSD::String(
boost::asio::buffers_begin(cbufs),