diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 11:32:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:12 +0200 |
commit | ef90021abe3735fba57145598fd7c3d359d2718e (patch) | |
tree | 9da3ef32700774f56e0225ea28f3bc4ceaffe80c /i18npool/source/calendar | |
parent | convert OUString 0==compareToAscii to equalsAscii (diff) | |
download | core-ef90021abe3735fba57145598fd7c3d359d2718e.tar.gz core-ef90021abe3735fba57145598fd7c3d359d2718e.zip |
convert OUString !compareToAscii to equalsAscii
Convert code like
if( ! aStr.compareToAscii("XXX") )
to
if( aStr.equalsAscii("XXX") )
which is both clearer and faster.
Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
Diffstat (limited to 'i18npool/source/calendar')
-rw-r--r-- | i18npool/source/calendar/calendarImpl.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index e88427d014f5..5f9396b130c6 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -349,7 +349,7 @@ const sal_Char cCalendar[] = "com.sun.star.i18n.LocaleCalendar"; sal_Bool SAL_CALL CalendarImpl::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return !rServiceName.compareToAscii(cCalendar); + return rServiceName.equalsAscii(cCalendar); } Sequence< OUString > SAL_CALL diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index b99df6a90a25..d547134fd538 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -1174,7 +1174,7 @@ Calendar_gregorian::getImplementationName(void) throw( RuntimeException ) sal_Bool SAL_CALL Calendar_gregorian::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return !rServiceName.compareToAscii(cCalendar); + return rServiceName.equalsAscii(cCalendar); } Sequence< OUString > SAL_CALL |