Skip to content

Commit

Permalink
AGS: Fix Wshadow warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Jan 16, 2024
1 parent 278eb8f commit a74e0f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/algs/ags/local_optimizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Trial HookeJeevesOptimizer::Optimize(std::shared_ptr<IGOProblem<double>> problem
mTrialsCounters[mPreviousResearchDirection.idx]++;
}

for(size_t i = 0; i < mTrialsCounters.size(); i++)
for(size_t j = 0; j < mTrialsCounters.size(); ++ j)
trialsCounters[i] += mTrialsCounters[i];

return mPreviousResearchDirection;
Expand Down
4 changes: 2 additions & 2 deletions src/algs/ags/solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ void NLPSolver::MakeTrials()
if(idx > mMaxIdx)
{
mMaxIdx = idx;
for(int i = 0; i < mMaxIdx; i++)
mZEstimations[i] = -mParameters.epsR*mHEstimations[i];
for(int j = 0; j < mMaxIdx; ++ j)
mZEstimations[j] = -mParameters.epsR*mHEstimations[j];
mNeedRefillQueue = true;
}
if (idx == mProblem->GetConstraintsNumber())
Expand Down

0 comments on commit a74e0f9

Please sign in to comment.