|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80627 - in trunk: boost/lockfree libs/lockfree/test
From: juergen.hunold_at_[hidden]
Date: 2012-09-22 11:40:08
Author: jhunold
Date: 2012-09-22 11:40:07 EDT (Sat, 22 Sep 2012)
New Revision: 80627
URL: http://svn.boost.org/trac/boost/changeset/80627
Log:
Fix min-max guideline violations
Fix some conversion warnings from msvc
Text files modified:
trunk/boost/lockfree/spsc_queue.hpp | 6 +++---
trunk/libs/lockfree/test/test_helpers.hpp | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
Modified: trunk/boost/lockfree/spsc_queue.hpp
==============================================================================
--- trunk/boost/lockfree/spsc_queue.hpp (original)
+++ trunk/boost/lockfree/spsc_queue.hpp 2012-09-22 11:40:07 EDT (Sat, 22 Sep 2012)
@@ -96,7 +96,7 @@
if (avail == 0)
return 0;
- input_count = std::min(input_count, avail);
+ input_count = (std::min)(input_count, avail);
size_t new_write_index = write_index + input_count;
@@ -131,7 +131,7 @@
return begin;
size_t input_count = std::distance(begin, end);
- input_count = std::min(input_count, avail);
+ input_count = (std::min)(input_count, avail);
size_t new_write_index = write_index + input_count;
@@ -181,7 +181,7 @@
if (avail == 0)
return 0;
- output_count = std::min(output_count, avail);
+ output_count = (std::min)(output_count, avail);
size_t new_read_index = read_index + output_count;
Modified: trunk/libs/lockfree/test/test_helpers.hpp
==============================================================================
--- trunk/libs/lockfree/test/test_helpers.hpp (original)
+++ trunk/libs/lockfree/test/test_helpers.hpp 2012-09-22 11:40:07 EDT (Sat, 22 Sep 2012)
@@ -70,9 +70,9 @@
return false;
}
- int count_nodes(void) const
+ std::size_t count_nodes(void) const
{
- int ret = 0;
+ std::size_t ret = 0;
for (int i = 0; i != buckets; ++i) {
boost::mutex::scoped_lock lock (ref_mutex[i]);
ret += data[i].size();
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk