stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r629584 - /stdcxx/trunk/include/string.cc
Date Sat, 23 Feb 2008 03:13:48 GMT
Farid Zaripov wrote:
> From: Martin Sebor [mailto:sebor@roguewave.com]
> To: dev@stdcxx.apache.org
> 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 <farid_zaripov@epam.com>
>>>
>>>       * 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


Mime
View raw message