summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/macnativeevents
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2017-02-25 10:42:12 +0100
committerMarc Mutz <marc.mutz@kdab.com>2017-03-06 10:55:15 +0000
commita7b9a1f96658b92687bea02eac3615e5f3de4d7b (patch)
treebeeaeffd9445341b9aa227b1c4cfa26bdd2032df /tests/auto/other/macnativeevents
parent80bfb8f1ad68c37260a295cd6df98acc571f4fde (diff)
QString: make ucstrncmp() work for more than 2Gi characters
Required for implementing upcoming QStringView's member functions such as compare(), indexOf(), endsWith(), ... Most implementations of the function body just add the length to the begin pointer to obtain an end pointer and then either no longer use the length, or decrease it in lock-step with increasing the begin pointer. The only exception is MIPS DSP's qt_ucstrncmp_mips_dsp_asm(), which gets the length passed in as an uint, implicitly converted from the int parameter, proving that calling the function with negative length was always undefined behavior, and therefore using an unsigned type does not introduce incompatibilites. I don't stand a snowball's chance in hell to fix the assembler routine, but since the code is only included for MIPS32, we don't need to do anything except be paranoid, add a static_assert that uint is the same size as size_t, and keep calling the old code. Dropped Q_COMPILER_LAMBDA in some places. We require lambdas since 5.7. Also hold lambdas by value, not by reference. This stuff is supposedly completely inlined, anyway, so there's no reason to make the code more complicated with magic lifetime extension of temporaries bound to references. Change-Id: I0c7bdc47648b873992b51b2e9d47d808390320ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other/macnativeevents')
0 files changed, 0 insertions, 0 deletions