[Libreoffice] [PUSHED]Re: [PATCH] EasyHack RTL_CONSTASCII_USTRINGPARAM 3
Caolán McNamara
caolanm at redhat.com
Sun Oct 31 10:51:11 PDT 2010
On Sun, 2010-10-31 at 13:41 +0100, Gert Faller wrote:
> Hi,
>
> I'am not sure of my previous mail...
This looks good. I pushed this patch as well.
I see (again this was already there and not added by your patch) a few
rather odd rtl::OUString sEmpty(OUString::createFromAscii("")) in there
to create an empty string. Clearly rtl::OUString sEmpty; is sufficient
to do that.
And places that have
if (sSomething == OUString::createFromAscii(""))
... if sSomething was empty
is a bit of a long-way-around,
if (!sSomething.getLength())
... if sSomething was empty
would be sufficient when sSomething is an rtl::OUString and knock a few
cycles off that test.
while where sSomething is an old-style "String" then
if (sSomething == String(OUString::createFromAscii("")))
... if sSomething was empty
could just become
if (!sSomething.Len())
... if sSomething was empty
C.
More information about the LibreOffice
mailing list