]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/src/mt_allocator.cc
hashtable.h: -Wshadow fixes.
[thirdparty/gcc.git] / libstdc++-v3 / src / mt_allocator.cc
index 4385fbc84bf65c01c1f9667af5c465858b6ddebb..da0b09cef2123331306441c2a2bc714b06ea1b70 100644 (file)
@@ -423,7 +423,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
        __bin._M_address = __address;
 
        char* __c = static_cast<char*>(__v) + sizeof(_Block_address);
-       _Block_record* __block = reinterpret_cast<_Block_record*>(__c);
+       __block = reinterpret_cast<_Block_record*>(__c);
        __bin._M_first[0] = __block;
        while (--__block_count > 0)
          {
@@ -505,8 +505,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
              const size_t __k = sizeof(_Thread_record)
                                 * _M_options._M_max_threads;
              __v = ::operator new(__k);
-             _Thread_record* _M_thread_freelist
-               = static_cast<_Thread_record*>(__v);
+             _M_thread_freelist = static_cast<_Thread_record*>(__v);
 
              // NOTE! The first assignable thread id is 1 since the
              // global pool uses id 0
@@ -528,8 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
                  // _M_thread_freelist.
                  __gthread_key_create(&freelist._M_key,
                                       ::_M_destroy_thread_key);
-                 freelist._M_thread_freelist
-                   = _M_thread_freelist;
+                 freelist._M_thread_freelist = _M_thread_freelist;
                }
              else
                {
@@ -552,10 +550,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
                    }
                  ::operator delete(static_cast<void*>(_M_old_array));
                }
-             freelist._M_thread_freelist_array
-               = _M_thread_freelist;
-             freelist._M_max_threads
-               = _M_options._M_max_threads;
+             freelist._M_thread_freelist_array = _M_thread_freelist;
+             freelist._M_max_threads = _M_options._M_max_threads;
            }
        }
 
@@ -570,7 +566,8 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
            __bin._M_address = NULL;
 
            __v = ::operator new(sizeof(size_t) * __max_threads);
-           std::memset(__v, 0, sizeof(size_t) * __max_threads);                    
+           std::memset(__v, 0, sizeof(size_t) * __max_threads);
+
            __bin._M_free = static_cast<size_t*>(__v);
 
            __v = ::operator new(sizeof(size_t) * __max_threads
@@ -630,8 +627,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
                }
            }
 
-           __gthread_setspecific(freelist._M_key,
-                                 (void*)_M_id);
+           __gthread_setspecific(freelist._M_key, (void*)_M_id);
          }
        return _M_id >= _M_options._M_max_threads ? 0 : _M_id;
       }
@@ -697,14 +693,12 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
          __gnu_cxx::__scoped_lock sentry(freelist_mutex);
 
          if (!freelist._M_thread_freelist_array
-             || freelist._M_max_threads
-                < _M_options._M_max_threads)
+             || freelist._M_max_threads < _M_options._M_max_threads)
            {
              const size_t __k = sizeof(_Thread_record)
                                 * _M_options._M_max_threads;
              __v = ::operator new(__k);
-             _Thread_record* _M_thread_freelist
-               = static_cast<_Thread_record*>(__v);
+             _M_thread_freelist = static_cast<_Thread_record*>(__v);
 
              // NOTE! The first assignable thread id is 1 since the
              // global pool uses id 0