Skip to content

Commit

Permalink
Merge pull request #122 from bchretien/fix/build-gcc-8
Browse files Browse the repository at this point in the history
Fix build for gcc 8
  • Loading branch information
bchretien authored Jul 1, 2018
2 parents b57fe17 + 1be9921 commit 8c6e84a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis
Submodule .travis updated 1 files
+0 −2 before_install
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ script:
- if [ "${COVERITY_SCAN_BRANCH}" != "1" ]; then ./.travis/run build; fi
after_success:
- ./.travis/run after_success
- codecov --gcov-root=/tmp/_ci/build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then codecov --gcov-root=/tmp/_ci/build ; fi
after_failure: ./.travis/run after_failure
before_install:
# Avoid bug on CI with OSX, see https://github.com/travis-ci/travis-ci/issues/8552
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- pip install --user codecov
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pip install --user codecov ; fi
- ./.travis/run before_install
- ./.travis/dependencies/eigen-${EIGEN_MAJOR}

Expand Down
4 changes: 3 additions & 1 deletion include/roboptim/core/detail/structured-input.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ namespace roboptim
{
assert(blockInd < BlockProvider::blocks.size());

return input.segment(static_cast<long>(BlockProvider::blocks[blockInd].first), static_cast<long>(BlockProvider::blocks[blockInd].second));
const std::pair<size_t, size_t>& block = this->BlockProvider::blocks[blockInd];
return input.segment(static_cast<typename U::argument_t::Index>(block.first),
static_cast<typename U::argument_t::Index>(block.second));
}

template<typename FuncType>
Expand Down
2 changes: 1 addition & 1 deletion include/roboptim/core/differentiable-function.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace roboptim
for (gradient_t::InnerIterator it (grad); it; ++it)
{
const index_t
idx = static_cast<const jacobian_t::Index> (it.index ());
idx = static_cast<jacobian_t::Index> (it.index ());
coefficients.push_back
(triplet_t (i, idx, it.value ()));
}
Expand Down
2 changes: 1 addition & 1 deletion include/roboptim/core/problem.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ namespace roboptim
}

template <>
inline typename Problem<EigenMatrixSparse>::jacobian_t
inline Problem<EigenMatrixSparse>::jacobian_t
Problem<EigenMatrixSparse>::jacobian (const_argument_ref x) const
{
typedef GenericDifferentiableFunction<EigenMatrixSparse>
Expand Down
4 changes: 2 additions & 2 deletions include/roboptim/core/result-analyzer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ namespace roboptim
}

template <>
inline typename ResultAnalyzer<EigenMatrixSparse>::size_type
inline ResultAnalyzer<EigenMatrixSparse>::size_type
ResultAnalyzer<EigenMatrixSparse>::computeRank (jacobian_t& jac) const
{
if (jac.nonZeros () == 0)
Expand Down Expand Up @@ -428,7 +428,7 @@ namespace roboptim
}

template <>
typename ResultAnalyzer<EigenMatrixSparse>::gradient_t
ResultAnalyzer<EigenMatrixSparse>::gradient_t
inline ResultAnalyzer<EigenMatrixSparse>::gradLagrangian () const
{
gradient_t grad_L;
Expand Down

0 comments on commit 8c6e84a

Please sign in to comment.