On 2015-10-15 02:38, Ziller Eike wrote:
> So from where does 's.indexOf(‘c’, i-2)' search?
>
> This is similar to integer overflow, and I think utilizing that in an
> API leads to less readable and potentially unexpectedly behaving
> code.

It depends on the value of i, of course. And you're not going to get any
better results with an unsigned offset.

> Anyhow this seems to be only vaguely related to the things that are discussed 
> in this thread.

There was a question whether to use signed or unsigned as the size type,
that somewhere turned into Qt's use of signed for string sizes/offsets
being inconsistent with STL/CSL. I suppose it has wandered off a bit on
a tangent, though.

-- 
Matthew

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to