Commit 75aa3f65 by Loren J. Rittle Committed by Loren J. Rittle

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
parent 4c7f5fea
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> 2005-01-18 David Edelsohn <edelsohn@gnu.org>
* config/os/aix/os_defines.h (_XOPEN_SOURCE): Delete. * config/os/aix/os_defines.h (_XOPEN_SOURCE): Delete.
......
// array allocator -*- C++ -*- // 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 // 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 // software; you can redistribute it and/or modify it under the
...@@ -120,11 +120,11 @@ namespace __gnu_cxx ...@@ -120,11 +120,11 @@ namespace __gnu_cxx
pointer pointer
allocate(size_type __n, const void* = 0) allocate(size_type __n, const void* = 0)
{ {
static size_type __used; static size_type __array_used;
if (_M_array == 0 || __used + __n > _M_array->size()) if (_M_array == 0 || __array_used + __n > _M_array->size())
std::__throw_bad_alloc(); std::__throw_bad_alloc();
pointer __ret = _M_array->begin() + __used; pointer __ret = _M_array->begin() + __array_used;
__used += __n; __array_used += __n;
return __ret; return __ret;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment