diff options
author | Loren J. Rittle <ljrittle@acm.org> | 2005-01-19 21:59:55 +0000 |
---|---|---|
committer | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2005-01-19 21:59:55 +0000 |
commit | 75aa3f658cb028f17b0d80fcbf322b3da0e615cb (patch) | |
tree | f6d72d77ff90e92138b1e819a107d4d8f88a5bc7 | |
parent | 4c7f5feab54c9fe78473a10d6c6f61738770fa63 (diff) | |
download | gcc-75aa3f658cb028f17b0d80fcbf322b3da0e615cb.zip gcc-75aa3f658cb028f17b0d80fcbf322b3da0e615cb.tar.gz gcc-75aa3f658cb028f17b0d80fcbf322b3da0e615cb.tar.bz2 |
array_allocator.h (array_allocator<>::allocate): Avoid __used.
* include/ext/array_allocator.h (array_allocator<>::allocate):
Avoid __used. Use __array_used instead.
From-SVN: r93923
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/array_allocator.h | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 33a9f47..3c29b43 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Loren J. Rittle <ljrittle@acm.org> + + * include/ext/array_allocator.h (array_allocator<>::allocate): + Avoid __used. Use __array_used instead. + 2005-01-18 David Edelsohn <edelsohn@gnu.org> * config/os/aix/os_defines.h (_XOPEN_SOURCE): Delete. diff --git a/libstdc++-v3/include/ext/array_allocator.h b/libstdc++-v3/include/ext/array_allocator.h index 54525f0..8689d9d 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; } }; |