Change in core[master]: fdo#51179: SearchAscii() is equal to indexOfAsciiL(), not ma...

Gerrit gerrit at gerrit.libreoffice.org
Mon Jul 9 05:59:45 PDT 2012


>From Eike Rathke <erack at redhat.com>:

Eike Rathke has posted comments on this change.

Change subject: fdo#51179: SearchAscii() is equal to indexOfAsciiL(), not match()
......................................................................


Patch Set 1: I would prefer that you didn't submit this

Indeed, good catch, and the patch seems to be correct.

But instead of all the indexOfAsciiL() with ugly and error prone hard coded length argument we now can benefit from the new internal::ConstCharArrayDetector indexOf() template, see sal/inc/rtl/ustring.hxx just before the indexOfAsciiL() declaration.

So, instead of
aFilterName.indexOfAsciiL("impress8", 8)
we can simply write
aFilterName.indexOf("impress8")

It would be great if you could submit a new patch using that easier to read and maintain method.

And yes, using >=0 is perfectly valid and fine.

--
To view, visit https://gerrit.libreoffice.org/264
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1c3160be1c61162f6a62a7e14c4efb7bedccdcc
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Gerrit-Reviewer: Eike Rathke <erack at redhat.com>
Gerrit-Reviewer: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Gerrit-Reviewer: Olivier Hallot <olivier.hallot at gmail.com>



More information about the LibreOffice mailing list