Farid Zaripov wrote:
From: Martin Sebor [mailto:[EMAIL PROTECTED]
To: [email protected]
Subject: Re: svn commit: r629584 - /stdcxx/trunk/include/string.cc
Author: faridz
Date: Wed Feb 20 11:37:12 2008
New Revision: 629584
URL: http://svn.apache.org/viewvc?rev=629584&view=rev
Log:
2008-02-20 Farid Zaripov <[EMAIL PROTECTED]>
* include/string.cc (__rw_replace): Removed unused variable __delta.
(__rw_replace_aux): Removed unused typedef. Used ::operator new() and
::operator delete() instead of std::allocator::allocate() and
std::allocator::deallocate() respectively (since private base class
std::allocator is not accessible in __rw_replace_aux()).
I don't think we're allowed to bypass the allocator and call new
directly.
Why? Here the operator new() used for allocate the temporary buffer and it's
deallocated within this function.
Ah. You're right, that shouldn't matter. Sorry for the noise.
(Although if it's temporary storage, we might want to consider either
allocating it directly on the stack, if the range is reasonably small,
or using the temporary buffer facility, __rw_tmpbuf()).
Martin