Kaydet (Commit) f6f5bde0 authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

Change-Id: I57baea223b0f0a78346d9872665ab85c00c8fc51
üst a96ae210
...@@ -82,13 +82,12 @@ PluginComm_Impl::PluginComm_Impl( const OUString& /*rMIME*/, const OUString& rNa ...@@ -82,13 +82,12 @@ PluginComm_Impl::PluginComm_Impl( const OUString& /*rMIME*/, const OUString& rNa
#endif #endif
DBG_ASSERT( _plDLL, "### loading plugin dll failed!" ); DBG_ASSERT( _plDLL, "### loading plugin dll failed!" );
NPError nErr = NPERR_NO_ERROR;
NPError (WINAPI * pEntry)( NPPluginFuncs* ); NPError (WINAPI * pEntry)( NPPluginFuncs* );
retrieveFunction( _T("NP_GetEntryPoints"), (void**)&pEntry ); retrieveFunction( _T("NP_GetEntryPoints"), (void**)&pEntry );
_NPPfuncs.size = sizeof( _NPPfuncs ); _NPPfuncs.size = sizeof( _NPPfuncs );
_NPPfuncs.version = 0; _NPPfuncs.version = 0;
nErr = (*pEntry)( &_NPPfuncs ); NPError nErr = (*pEntry)( &_NPPfuncs );
DBG_ASSERT( nErr == NPERR_NO_ERROR, "### NP_GetEntryPoints() failed!" ); DBG_ASSERT( nErr == NPERR_NO_ERROR, "### NP_GetEntryPoints() failed!" );
DBG_ASSERT( (_NPPfuncs.version >> 8) >= NP_VERSION_MAJOR, DBG_ASSERT( (_NPPfuncs.version >> 8) >= NP_VERSION_MAJOR,
......
...@@ -180,7 +180,6 @@ double BesselJ( double x, sal_Int32 N ) throw (IllegalArgumentException, NoConve ...@@ -180,7 +180,6 @@ double BesselJ( double x, sal_Int32 N ) throw (IllegalArgumentException, NoConve
double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConvergenceException ) double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConvergenceException )
{ {
const double fEpsilon = 1.0E-15;
const sal_Int32 nMaxIteration = 2000; const sal_Int32 nMaxIteration = 2000;
const double fXHalf = x / 2.0; const double fXHalf = x / 2.0;
if( n < 0 ) if( n < 0 )
...@@ -203,6 +202,7 @@ double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConve ...@@ -203,6 +202,7 @@ double BesselI( double x, sal_Int32 n ) throw( IllegalArgumentException, NoConve
if( fTerm != 0.0 ) if( fTerm != 0.0 )
{ {
nK = 1; nK = 1;
const double fEpsilon = 1.0E-15;
do do
{ {
/* Calculation of TERM(n,k) from TERM(n,k-1): /* Calculation of TERM(n,k) from TERM(n,k-1):
...@@ -400,7 +400,6 @@ double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceExcep ...@@ -400,7 +400,6 @@ double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceExcep
const double EulerGamma = 0.57721566490153286060; const double EulerGamma = 0.57721566490153286060;
double alpha = 1.0/fX; double alpha = 1.0/fX;
double f_bar = -1.0; double f_bar = -1.0;
double g = 0.0;
double u = alpha; double u = alpha;
double k = 1.0; double k = 1.0;
double m_bar = 0.0; double m_bar = 0.0;
...@@ -409,7 +408,7 @@ double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceExcep ...@@ -409,7 +408,7 @@ double Bessely1( double fX ) throw( IllegalArgumentException, NoConvergenceExcep
double g_bar = -2.0 / fX; double g_bar = -2.0 / fX;
double delta_u = g_bar_delta_u / g_bar; double delta_u = g_bar_delta_u / g_bar;
u = u + delta_u; u = u + delta_u;
g = -1.0/g_bar; double g = -1.0/g_bar;
f_bar = f_bar * g; f_bar = f_bar * g;
double sign_alpha = -1.0; double sign_alpha = -1.0;
double km1mod2; //will be (k-1) mod 2 double km1mod2; //will be (k-1) mod 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment