On 09/04/2012 02:33 AM, Ricardo Montania wrote:
Hi everyone. I've received a suggestion about the change from my patch:

(...)
Remove "RTL_CONSTASCII_USTRINGPARAM". Like this:

- -    binaryUno_(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO))),
+    binaryUno_(OUString(UNO_LB_UNO)),

or

+    binaryUno_(UNO_LB_UNO),
if UNO_LB_UNO is a valid type to OUString (check)
(...)


How can I check? Just recompile the module or dbg is necessary?

There is a non-explicit rtl::OUString ctor taking a string literal now, and since UNO_LB_UNO is defined as a string literal (in cppu/inc/uno/lbnames.h, cf. "git grep -Fw UNO_LB_UNO") the explicit mention of the rtl::OUString ctor can (and arguably should) be dropped.

Would you like to go over your patch and remove the unnecessary occurrences of "OUString(...)"? (One minor gotcha is that some compilers still require the OUString(...) in return statements.)

Stephan

(PS: Another minor nit with your patch is that it spoils indentation in some places, like with

@@ -197,12 +197,10 @@ Bridge::Bridge(
             css::uno::Reference< css::bridge::XProtocolProperties > >::get()),
     protPropRequest_(
         OUString(
-            RTL_CONSTASCII_USTRINGPARAM(
-                "com.sun.star.bridge.XProtocolProperties::requestChange"))),
+                "com.sun.star.bridge.XProtocolProperties::requestChange")),

where the string literal should only be indented 4-deep relative to the "OUString(" now -- or rather the "propPropRequest_(" when the unnecessary "OUString(...)" is removed.)
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to