Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54693 - in branches/release: . boost/asio/detail
From: chris_at_[hidden]
Date: 2009-07-05 19:00:04


Author: chris_kohlhoff
Date: 2009-07-05 19:00:03 EDT (Sun, 05 Jul 2009)
New Revision: 54693
URL: http://svn.boost.org/trac/boost/changeset/54693

Log:
Merged revisions 54525-54526 from trunk.

........
  r54525 | chris_kohlhoff | 2009-06-30 18:19:56 +1000 (Tue, 30 Jun 2009) | 2 lines
  
  Don't rehash if the number of buckets hasn't changed.
........
  r54526 | chris_kohlhoff | 2009-06-30 18:22:03 +1000 (Tue, 30 Jun 2009) | 2 lines
  
  Check that WINVER is actually defined when using it.
........

Properties modified:
   branches/release/ (props changed)
Text files modified:
   branches/release/boost/asio/detail/hash_map.hpp | 3 +++
   branches/release/boost/asio/detail/win_iocp_io_service.hpp | 4 ++--
   branches/release/boost/asio/detail/win_thread.hpp | 6 +++---
   3 files changed, 8 insertions(+), 5 deletions(-)

Modified: branches/release/boost/asio/detail/hash_map.hpp
==============================================================================
--- branches/release/boost/asio/detail/hash_map.hpp (original)
+++ branches/release/boost/asio/detail/hash_map.hpp 2009-07-05 19:00:03 EDT (Sun, 05 Jul 2009)
@@ -215,6 +215,9 @@
   // Re-initialise the hash from the values already contained in the list.
   void rehash(std::size_t num_buckets)
   {
+ if (num_buckets == buckets_.size())
+ return;
+
     iterator end = values_.end();
 
     // Update number of buckets and initialise all buckets to empty.

Modified: branches/release/boost/asio/detail/win_iocp_io_service.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_iocp_io_service.hpp (original)
+++ branches/release/boost/asio/detail/win_iocp_io_service.hpp 2009-07-05 19:00:03 EDT (Sun, 05 Jul 2009)
@@ -132,7 +132,7 @@
     while (::InterlockedExchangeAdd(&outstanding_operations_, 0) > 0)
     {
       DWORD bytes_transferred = 0;
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
       DWORD completion_key = 0;
 #else
       DWORD_PTR completion_key = 0;
@@ -419,7 +419,7 @@
 
       // Get the next operation from the queue.
       DWORD bytes_transferred = 0;
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
       DWORD completion_key = 0;
 #else
       DWORD_PTR completion_key = 0;

Modified: branches/release/boost/asio/detail/win_thread.hpp
==============================================================================
--- branches/release/boost/asio/detail/win_thread.hpp (original)
+++ branches/release/boost/asio/detail/win_thread.hpp 2009-07-05 19:00:03 EDT (Sun, 05 Jul 2009)
@@ -40,7 +40,7 @@
 
 unsigned int __stdcall win_thread_function(void* arg);
 
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
 void __stdcall apc_function(ULONG data);
 #else
 void __stdcall apc_function(ULONG_PTR data);
@@ -156,7 +156,7 @@
 private:
   friend unsigned int __stdcall win_thread_function(void* arg);
 
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
   friend void __stdcall apc_function(ULONG);
 #else
   friend void __stdcall apc_function(ULONG_PTR);
@@ -217,7 +217,7 @@
   return 0;
 }
 
-#if (WINVER < 0x0500)
+#if defined(WINVER) && (WINVER < 0x0500)
 inline void __stdcall apc_function(ULONG) {}
 #else
 inline void __stdcall apc_function(ULONG_PTR) {}


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