From dc135ac4c097ef286de8a5ef4eff94e793567346 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 4 May 2011 22:58:22 +0200 Subject: Some cppcheck cleaning --- i18npool/source/calendar/calendar_hijri.cxx | 3 +-- i18npool/source/search/levdis.cxx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index 4921c90f2223..ec0e86baf24e 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -269,12 +269,11 @@ Calendar_hijri::getGregorianDay(sal_Int32 lJulianDay, sal_Int32 *pnDay, sal_Int3 { /* working variables */ long lFactorA, lFactorB, lFactorC, lFactorD, lFactorE; - long lAdjust; /* test whether to adjust for the Gregorian calendar crossover */ if (lJulianDay >= GREGORIAN_CROSSOVER) { /* calculate a small adjustment */ - lAdjust = (long) (((float) (lJulianDay - 1867216) - 0.25) / 36524.25); + long lAdjust = (long) (((float) (lJulianDay - 1867216) - 0.25) / 36524.25); lFactorA = lJulianDay + 1 + lAdjust - ((long) (0.25 * lAdjust)); diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index 252421fa25ce..fe1d1833e944 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -307,12 +307,12 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) // aus Userwerten nOtherX, nShorterY, nLongerZ, bRelaxed int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed ) { - int nMid, nMax; if ( nX < 0 ) nX = 0; // nur positive Werte if ( nY < 0 ) nY = 0; if ( nZ < 0 ) nZ = 0; if (0 == Min3( nX, nY, nZ )) // mindestens einer 0 { + int nMid, nMax; nMax = Max3( nX, nY, nZ ); // entweder 0 bei drei 0 oder Max if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // sogar zwei 0 nLimit = nMax; // entweder 0 oder einziger >0 -- cgit