diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 14:05:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 14:31:38 +0100 |
commit | 890afecb45bfcd2e53599974fbcf61fffd8f8a7b (patch) | |
tree | 9233bafbcfae88e93d387e501e3195aa3e98d2f4 /i18npool | |
parent | faa63cd14c1d360d0e4eedb64cd879aa1229fa60 (diff) |
loplugin:buriedassign in dbaccess..oox
Change-Id: Ic0ca695a1d9d05418213475a68e233953136cc8e
Reviewed-on: https://gerrit.libreoffice.org/63468
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 38 | ||||
-rw-r--r-- | i18npool/source/collator/collatorImpl.cxx | 3 |
2 files changed, 23 insertions, 18 deletions
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 056d25dd2823..b8f1d15ee66f 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -167,8 +167,8 @@ Calendar_gregorian::init(const Era *_eraArray) * */ icu::Locale aIcuLocale( "", nullptr, nullptr, "calendar=gregorian"); - UErrorCode status; - body.reset( icu::Calendar::createInstance( aIcuLocale, status = U_ZERO_ERROR) ); + UErrorCode status = U_ZERO_ERROR; + body.reset( icu::Calendar::createInstance( aIcuLocale, status) ); if (!body || !U_SUCCESS(status)) throw ERROR; eraArray=_eraArray; } @@ -300,8 +300,8 @@ Calendar_gregorian::setDateTime( double fTimeInDays ) double fR = rtl::math::round( fM ); SAL_INFO_IF( fM != fR, "i18npool", "Calendar_gregorian::setDateTime: " << std::fixed << fM << " rounded to " << fR); - UErrorCode status; - body->setTime( fR, status = U_ZERO_ERROR); + UErrorCode status = U_ZERO_ERROR; + body->setTime( fR, status); if ( !U_SUCCESS(status) ) throw ERROR; getValue(); } @@ -313,8 +313,8 @@ Calendar_gregorian::getDateTime() setValue(); getValue(); } - UErrorCode status; - double fR = body->getTime(status = U_ZERO_ERROR); + UErrorCode status = U_ZERO_ERROR; + double fR = body->getTime(status); if ( !U_SUCCESS(status) ) throw ERROR; return fR / U_MILLIS_PER_DAY; } @@ -328,10 +328,11 @@ Calendar_gregorian::setLocalDateTime( double fTimeInDays ) SAL_INFO_IF( fM != fR, "i18npool", "Calendar_gregorian::setLocalDateTime: " << std::fixed << fM << " rounded to " << fR); int32_t nZoneOffset, nDSTOffset; - UErrorCode status; - body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status = U_ZERO_ERROR ); + UErrorCode status = U_ZERO_ERROR; + body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status ); if ( !U_SUCCESS(status) ) throw ERROR; - body->setTime( fR - (nZoneOffset + nDSTOffset), status = U_ZERO_ERROR ); + status = U_ZERO_ERROR; + body->setTime( fR - (nZoneOffset + nDSTOffset), status ); if ( !U_SUCCESS(status) ) throw ERROR; getValue(); } @@ -343,12 +344,14 @@ Calendar_gregorian::getLocalDateTime() setValue(); getValue(); } - UErrorCode status; - double fTime = body->getTime( status = U_ZERO_ERROR ); + UErrorCode status = U_ZERO_ERROR; + double fTime = body->getTime( status ); if ( !U_SUCCESS(status) ) throw ERROR; - int32_t nZoneOffset = body->get( UCAL_ZONE_OFFSET, status = U_ZERO_ERROR ); + status = U_ZERO_ERROR; + int32_t nZoneOffset = body->get( UCAL_ZONE_OFFSET, status ); if ( !U_SUCCESS(status) ) throw ERROR; - int32_t nDSTOffset = body->get( UCAL_DST_OFFSET, status = U_ZERO_ERROR ); + status = U_ZERO_ERROR; + int32_t nDSTOffset = body->get( UCAL_DST_OFFSET, status ); if ( !U_SUCCESS(status) ) throw ERROR; return (fTime + (nZoneOffset + nDSTOffset)) / U_MILLIS_PER_DAY; } @@ -528,8 +531,9 @@ void Calendar_gregorian::getValue() fieldIndex == CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS) continue; // not ICU fields - UErrorCode status; sal_Int32 value = body->get( fieldNameConverter( - fieldIndex), status = U_ZERO_ERROR); + UErrorCode status = U_ZERO_ERROR; + sal_Int32 value = body->get( fieldNameConverter( + fieldIndex), status); if ( !U_SUCCESS(status) ) throw ERROR; // Convert millisecond to minute for ZONE and DST and set remainder in @@ -579,8 +583,8 @@ void SAL_CALL Calendar_gregorian::addValue( sal_Int16 fieldIndex, sal_Int32 value ) { // since ZONE and DST could not be add, we don't need to convert value here - UErrorCode status; - body->add(fieldNameConverter(fieldIndex), value, status = U_ZERO_ERROR); + UErrorCode status = U_ZERO_ERROR; + body->add(fieldNameConverter(fieldIndex), value, status); if ( !U_SUCCESS(status) ) throw ERROR; getValue(); } diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 9d779be08bd6..fb15a7b93c2b 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -86,7 +86,8 @@ CollatorImpl::loadCollatorAlgorithm(const OUString& impl, const lang::Locale& rL if (!cachedItem) throw RuntimeException(); // impl could not be loaded - cachedItem->xC->loadCollatorAlgorithm(cachedItem->algorithm, nLocale = rLocale, collatorOptions); + nLocale = rLocale; + cachedItem->xC->loadCollatorAlgorithm(cachedItem->algorithm, nLocale, collatorOptions); return 0; } |