diff options
author | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-19 21:59:55 +0000 |
---|---|---|
committer | ljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-19 21:59:55 +0000 |
commit | 311d2dedc7d9cb5d82a1a4981b3767cd71fdfdf1 (patch) | |
tree | f6d72d77ff90e92138b1e819a107d4d8f88a5bc7 /libstdc++-v3/include/ext | |
parent | ddf88afacb989e2b9d3b03d94e30b2a822e816f8 (diff) | |
download | gcc-311d2dedc7d9cb5d82a1a4981b3767cd71fdfdf1.tar.gz |
* include/ext/array_allocator.h (array_allocator<>::allocate):
Avoid __used. Use __array_used instead.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93923 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext')
-rw-r--r-- | libstdc++-v3/include/ext/array_allocator.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libstdc++-v3/include/ext/array_allocator.h b/libstdc++-v3/include/ext/array_allocator.h index 54525f03413..8689d9da26a 100644 --- a/libstdc++-v3/include/ext/array_allocator.h +++ b/libstdc++-v3/include/ext/array_allocator.h @@ -1,6 +1,6 @@ // array allocator -*- C++ -*- -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -120,11 +120,11 @@ namespace __gnu_cxx pointer allocate(size_type __n, const void* = 0) { - static size_type __used; - if (_M_array == 0 || __used + __n > _M_array->size()) + static size_type __array_used; + if (_M_array == 0 || __array_used + __n > _M_array->size()) std::__throw_bad_alloc(); - pointer __ret = _M_array->begin() + __used; - __used += __n; + pointer __ret = _M_array->begin() + __array_used; + __array_used += __n; return __ret; } }; |