make OUString::copy() clip

Stephan Bergmann sbergman at redhat.com
Thu Aug 2 05:42:57 PDT 2012


On 08/02/2012 02:39 PM, Noel Grandin wrote:
> On 2012-08-02 14:35, Stephan Bergmann wrote:
>> No "defensive programming," please.  If we consider a given
>> (beginIndex, count) arguments a violation of copy's precondition, then
>> fail on it, as fast as possible (via assert -> abort in a non-NDEBUG
>> build, via undefined behavior (-> hopefully crash soon) otherwise).
> Rather crash earlier than later.
>    *NULL = 0xdeadbeef;
> can't be all that expensive.

Then rather -UNDEBUG.  Can't be all that expensive, either.

Stephan


More information about the LibreOffice mailing list