Am 27.09.2010 um 13:54 schrieb Pavel Sanda:
> Stephan Witt wrote:
>> But seriously: there is already one fragile separator implementation!
>
> yes and we already have one crashing bug just in the return d->text_[pos] ==
> ' ';
> point (6453) ;)
I had a look and now I'm asking myself:
is it a good idea to check the pos value here?
Normally I'd do that. But I know some people have the opinion:
"I'd like to crash the program if the function is called with invalid
arguments."
But then an ASSERT should be added.
Anyway, we should do something with the FIXME.
An implementation of isSeparator has to try harder, IMHO.
Stephan
>
>>
>> ================
>> bool Paragraph::isSeparator(pos_type pos) const
>> {
>> //FIXME: Are we sure this can be the only separator?
>> return d->text_[pos] == ' ';
>> }
>> ================
>>
>> Stephan