Kaydet (Commit) d61d47ad authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite)

Change-Id: I0fc3144d5791e66d873c36f9a9adf1f3ca152d52
üst 2e353981
...@@ -243,7 +243,7 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception) ...@@ -243,7 +243,7 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception)
} }
pMatrixBegin[nVariables] = nMatrixPos; pMatrixBegin[nVariables] = nMatrixPos;
delete[] pCompMatrix; delete[] pCompMatrix;
pCompMatrix = NULL; pCompMatrix = nullptr;
// apply settings to all variables // apply settings to all variables
...@@ -291,9 +291,9 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception) ...@@ -291,9 +291,9 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception)
HPROB hProb = CoinCreateProblem(""); HPROB hProb = CoinCreateProblem("");
int nResult = CoinLoadProblem( hProb, nVariables, nRows, nMatrixPos, 0, int nResult = CoinLoadProblem( hProb, nVariables, nRows, nMatrixPos, 0,
nObjectSense, nObjectConst, pObjectCoeffs, nObjectSense, nObjectConst, pObjectCoeffs,
pLowerBounds, pUpperBounds, pRowType, pRHS, NULL, pLowerBounds, pUpperBounds, pRowType, pRHS, nullptr,
pMatrixBegin, pMatrixCount, pMatrixIndex, pMatrix, pMatrixBegin, pMatrixCount, pMatrixIndex, pMatrix,
NULL, NULL, NULL ); nullptr, nullptr, nullptr );
if (nResult == SOLV_CALL_SUCCESS) if (nResult == SOLV_CALL_SUCCESS)
{ {
nResult = CoinLoadInteger( hProb, pColType ); nResult = CoinLoadInteger( hProb, pColType );
...@@ -340,7 +340,7 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception) ...@@ -340,7 +340,7 @@ void SAL_CALL CoinMPSolver::solve() throw(uno::RuntimeException, std::exception)
// get solution // get solution
maSolution.realloc( nVariables ); maSolution.realloc( nVariables );
CoinGetSolutionValues( hProb, maSolution.getArray(), NULL, NULL, NULL ); CoinGetSolutionValues( hProb, maSolution.getArray(), nullptr, nullptr, nullptr );
mfResultValue = CoinGetObjectValue( hProb ); mfResultValue = CoinGetObjectValue( hProb );
} }
else else
......
...@@ -312,7 +312,7 @@ void SAL_CALL LpsolveSolver::solve() throw(uno::RuntimeException, std::exception ...@@ -312,7 +312,7 @@ void SAL_CALL LpsolveSolver::solve() throw(uno::RuntimeException, std::exception
maSolution.realloc( nVariables ); maSolution.realloc( nVariables );
REAL* pResultVar = NULL; REAL* pResultVar = nullptr;
get_ptr_variables( lp, &pResultVar ); get_ptr_variables( lp, &pResultVar );
for (nVar=0; nVar<nVariables; nVar++) for (nVar=0; nVar<nVariables; nVar++)
maSolution[nVar] = pResultVar[nVar]; maSolution[nVar] = pResultVar[nVar];
......
...@@ -42,7 +42,7 @@ using namespace com::sun::star; ...@@ -42,7 +42,7 @@ using namespace com::sun::star;
// Resources from tools are used for translated strings // Resources from tools are used for translated strings
ResMgr* SolverComponent::pSolverResMgr = NULL; ResMgr* SolverComponent::pSolverResMgr = nullptr;
OUString SolverComponent::GetResourceString( sal_uInt32 nId ) OUString SolverComponent::GetResourceString( sal_uInt32 nId )
{ {
......
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