From 966f40eecfc60f20c309bc2477149442d753763a Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Sat, 4 May 2019 17:06:38 +0300 Subject: Use hasElements to check Sequence emptiness in [e-i]* Similar to clang-tidy readability-container-size-empty Change-Id: I79e31919db8f4132216f09a7868d18835eeb154b Reviewed-on: https://gerrit.libreoffice.org/71795 Tested-by: Jenkins Reviewed-by: Noel Grandin --- i18npool/source/localedata/localedata.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'i18npool/source/localedata/localedata.cxx') diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 454c4045ddef..91808eebdb77 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -673,7 +673,7 @@ Sequence< CalendarItem2 > &LocaleDataImpl::getCalendarItemByName(const OUString& // Referred locale not found, return name for en_US locale. if (index == cals.getLength()) { cals = getAllCalendars2( Locale("en", "US", OUString()) ); - if (cals.getLength() <= 0) + if (!cals.hasElements()) throw RuntimeException(); ref_cal = cals[0]; } -- cgit