connectivity/source/drivers/postgresql/pq_xkeys.cxx: compareToAscii -> operator== sound?
Michael Meeks
michael.meeks at suse.com
Wed Mar 20 15:57:42 PDT 2013
On Tue, 2013-03-19 at 18:11 +0100, Stephan Bergmann wrote:
> >>> - if( rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "r" ) ) == 0 )
> >>> + if( rule == "r" )
> > ...
> > sal_Int32 compareToAscii( const sal_Char* asciiStr ) const SAL_THROW(())
>
> No. Note that there is another overload of compareToAscii with two
> parameters, with is the subject here.
Right ! good catch; it's not immediately obvious that the
RTL_CONSTASCII_STRINGPARAM( "foo " ) expands to two parameters - I
guess, I'm spoiled by the nice clean world of Lubos' new strings :-)
rule.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "r" ) ) == 0
Thanks for fixing that all up and deprecating the method; I guess
deprecating RTL_CONSTASCII_STRINGPARAM would be nice too as/when it's
possible.
ATB,
Michael.
--
michael.meeks at suse.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice
mailing list