On Tue, 2012-02-28 at 12:30 +0100, Lubos Lunak wrote:
> RTL_CONSTASCII_USTRINGPARAM. While I was ambivalent about it, I now think we 
> should go with ASCII only, unless explicitly marked otherwise.

        :-) your arguments make sense to me at least.

     OUString( const char (&literal)[ N ] )
     {
         pData = 0;
-        rtl_string2UString( &pData, literal, N - 1, RTL_TEXTENCODING_UTF8, 
OSTRING_TO_OUSTRING_CVTFLAGS );
+        rtl_string2UString( &pData, literal, N - 1, RTL_TEXTENCODING_ASCII_US, 
0 );

        I would really prefer to use a new:

        rtl_uString_newFromAsciiL( &pNew, literal, N - 1 );

        method - which should shrink the call-site, and allow for a rather
better implementation vs.

        rtl_impl_convertUStringToString

        which has no fast-case for ASCII, and it requires these two extra
parameters we don't need to setup in each case :-)

        Otherwise, this looks like some really nice work :-)

        Thanks !

                Michael.

-- 
[email protected]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to