[Bug 88205] Adapt uses of css::uno::Sequence to use initializer_list ctor

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jan 26 13:42:55 PST 2015


https://bugs.documentfoundation.org/show_bug.cgi?id=88205

Michael Meeks <michael.meeks at collabora.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.meeks at collabora.com

--- Comment #1 from Michael Meeks <michael.meeks at collabora.com> ---
As Stephan says that's really great for the getSupportedServiceNames cases: a
quick:

$ git grep -5 getSupportedServiceNames

shows you a load of these places (when you get through accessibility) where we
can turn two or often three lines into one like this:

 css::uno::Sequence< OUString >
 BridgeFactory::static_getSupportedServiceNames() {
-    OUString name("com.sun.star.bridge.BridgeFactory");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence<OUString>{ "com.sun.star.bridge.BridgeFactory"
};
 }

Then again - it's not clear to me that this wouldn't produce rather more
efficient code with a var-arg method that took C strings =) but at least far
more terse.

Thanks !

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150126/79040b68/attachment.html>


More information about the LibreOffice mailing list