Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Thursday 09 of February 2012, Michael Meeks wrote:
On Thu, 2012-02-09 at 09:20 +0000, Caolán McNamara wrote:
Yeah, see commentary around SAL_UNUSED_PARAMETER in sal/inc/sal/types.h,
can replace it with that if necessary.

      If we can choose - why do we add such over-long macros ? :-)
...
      Personally, I'd -love- someone to rename ~all of these
RTL_USTR() or RTL_STR() or somesuch - we have enough pointlessly hard to
read and indent coding around the place. Hey - we could even have an:

      RTL_USTRING("foo")

      that hid all the:

      rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("foo"))

      madness from sight ;-)

 It'd be probably almost the same amount of work to get rid of the macro 
completely and add a special ctor to handle string literals (can you arrange 
a HackWeek for me soon ;) ? ).

      (though there is perhaps at least some merit in 
typing all that stuff to remind you how inefficient the Ascii -> UTC2
conversion is I guess).

 That's meant to be UCS-2, right? How is that supposed to be inefficient, it's 
just plain 1-byte -> 2-bytes extension.

      Anyhow - on this topic:

      Any chance of SAL_UNUSED ? ;-) At worse, SAL_UNUSED_PARAM.

 SAL_UNUSED_PARAM? And that's how the Writer codebase came around ... . Unlike 
RTL_CONSTASCII_USTRINGPARAM(), this one is unlikely to be used often, so I 
see no special need to strive for brevity here. That said, SAL_UNUSED seems 
ok.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.