Boost library min/max guidance:

fix #170
This commit is contained in:
Vinnie Falco
2016-11-12 11:27:56 -05:00
parent 02feea5128
commit 84a6775dc1
13 changed files with 21 additions and 19 deletions
+2 -2
View File
@@ -20,8 +20,8 @@ public:
void testClamp()
{
BEAST_EXPECT(clamp(
std::numeric_limits<std::uint64_t>::max()) ==
std::numeric_limits<std::size_t>::max());
(std::numeric_limits<std::uint64_t>::max)()) ==
(std::numeric_limits<std::size_t>::max)());
}
void run() override
+1 -1
View File
@@ -514,7 +514,7 @@ public:
write(db, "Transfer-Encoding: chunked\r\n\r\n");
while(len > 0)
{
auto n = std::min(1 + rand(300), len);
auto n = (std::min)(1 + rand(300), len);
len -= n;
write(db, to_hex(n), "\r\n");
for(auto const& b : db.prepare(n))
+1 -1
View File
@@ -289,7 +289,7 @@ public:
streambuf sb(size);
while(n)
{
auto const amount = std::min(n, size);
auto const amount = (std::min)(n, size);
sb.commit(buffer_copy(sb.prepare(amount), cb));
cb.consume(amount);
n -= amount;