summaryrefslogtreecommitdiff
path: root/boost/asio/detail/buffer_resize_guard.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/detail/buffer_resize_guard.hpp')
-rw-r--r--boost/asio/detail/buffer_resize_guard.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/boost/asio/detail/buffer_resize_guard.hpp b/boost/asio/detail/buffer_resize_guard.hpp
index ea783306c4..56304e5b27 100644
--- a/boost/asio/detail/buffer_resize_guard.hpp
+++ b/boost/asio/detail/buffer_resize_guard.hpp
@@ -2,7 +2,7 @@
// detail/buffer_resize_guard.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,7 +16,7 @@
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
-#include <boost/limits.hpp>
+#include <boost/asio/detail/limits.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -39,8 +39,7 @@ public:
// Destructor rolls back the buffer resize unless commit was called.
~buffer_resize_guard()
{
- if (old_size_
- != std::numeric_limits<size_t>::max BOOST_PREVENT_MACRO_SUBSTITUTION())
+ if (old_size_ != (std::numeric_limits<size_t>::max)())
{
buffer_.resize(old_size_);
}
@@ -49,8 +48,7 @@ public:
// Commit the resize transaction.
void commit()
{
- old_size_
- = std::numeric_limits<size_t>::max BOOST_PREVENT_MACRO_SUBSTITUTION();
+ old_size_ = (std::numeric_limits<size_t>::max)();
}
private: