On October 15, 2015 15:56:35 Matthew Woehlke <mwoehlke.fl...@gmail.com> wrote:
> 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. You could get an assert or warning because you are out of range. >> 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. > I would prefer we would be more in line with the standard library. All the casts to silence warnings are not very beautiful. _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development