[Patch] Fix (similarly) libstdc++/9178 and 11305
Paolo Carlini
pcarlini@unitus.it
Fri Jun 27 11:45:00 GMT 2003
Pétur Runólfsson wrote:
>>+ int __ext_multiplier = _M_codecvt->encoding();
>>+ if (__ext_multiplier == -1 || __ext_multiplier == 0)
>>+ __ext_multiplier = _M_codecvt->max_length();
>>
>>
>
>I think this can be simplified to
>
> int __ext_multiplier = _M_codecvt->max_length();
>
>since _M_codecvt->encoding() == _M_codecvt->max_length() if
>_M_codecvt->encoding() > 0
>
Thanks...
>>+ virtual int
>>+ do_length(const StateT&, const extern_type* from,
>>+ const extern_type* end, size_t max) const
>>+ {
>>
>>
>According to the resolution to DR 75 (TC) the type of the first
>parameter of length() and do_length() is StateT&, not const StateT&
>(my fault, I wrote this testcase :-)
>
... and thanks!
Will commit with those changes.
Paolo.
More information about the Libstdc++
mailing list