Commit 025409e0 authored by David Frank's avatar David Frank
Browse files

Remove warnings from SubsetProblem

Depends on !175
parent 74f4eea3
Pipeline #530521 passed with stages
in 13 minutes and 14 seconds
#include "SubsetProblem.h"
#include "TypeCasts.hpp"
namespace elsa
{
......@@ -36,8 +37,8 @@ namespace elsa
"SubsetProblem: subset index out of bounds for number of subsets");
}
_subsetProblems[subset]->getCurrentSolution() = this->getCurrentSolution();
return _subsetProblems[subset]->getGradient();
_subsetProblems[asUnsigned(subset)]->getCurrentSolution() = this->getCurrentSolution();
return _subsetProblems[asUnsigned(subset)]->getGradient();
}
template <typename data_t>
......@@ -47,14 +48,14 @@ namespace elsa
throw std::invalid_argument(
"SubsetProblem: subset index out of bounds for number of subsets");
}
_subsetProblems[subset]->getCurrentSolution() = this->getCurrentSolution();
_subsetProblems[subset]->getGradient(result);
_subsetProblems[asUnsigned(subset)]->getCurrentSolution() = this->getCurrentSolution();
_subsetProblems[asUnsigned(subset)]->getGradient(result);
}
template <typename data_t>
index_t SubsetProblem<data_t>::getNumberOfSubsets() const
{
return _subsetProblems.size();
return asSigned(_subsetProblems.size());
}
template <typename data_t>
......
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