From 59ea8944fee004b49d42a2bd6a45c26fbc628104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Chr=C3=A9tien?= Date: Fri, 29 Jun 2018 21:55:25 +0200 Subject: [PATCH 1/3] Fix build for gcc 8 --- include/roboptim/core/detail/structured-input.hxx | 3 ++- include/roboptim/core/differentiable-function.hxx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/roboptim/core/detail/structured-input.hxx b/include/roboptim/core/detail/structured-input.hxx index 33303c98d..3c1f9bb8d 100644 --- a/include/roboptim/core/detail/structured-input.hxx +++ b/include/roboptim/core/detail/structured-input.hxx @@ -58,7 +58,8 @@ namespace roboptim { assert(blockInd < BlockProvider::blocks.size()); - return input.segment(static_cast(BlockProvider::blocks[blockInd].first), static_cast(BlockProvider::blocks[blockInd].second)); + const std::pair& block = this->BlockProvider::blocks[blockInd]; + return input.segment(block.first, block.second); } template diff --git a/include/roboptim/core/differentiable-function.hxx b/include/roboptim/core/differentiable-function.hxx index a5d0611c5..1cd418638 100644 --- a/include/roboptim/core/differentiable-function.hxx +++ b/include/roboptim/core/differentiable-function.hxx @@ -52,7 +52,7 @@ namespace roboptim for (gradient_t::InnerIterator it (grad); it; ++it) { const index_t - idx = static_cast (it.index ()); + idx = static_cast (it.index ()); coefficients.push_back (triplet_t (i, idx, it.value ())); } From be2da75148f8b5d840b94be650761238907299c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Chr=C3=A9tien?= Date: Fri, 29 Jun 2018 22:33:35 +0200 Subject: [PATCH 2/3] [ci] Fix OSX build --- .travis | 2 +- .travis.yml | 4 ++-- include/roboptim/core/detail/structured-input.hxx | 3 ++- include/roboptim/core/problem.hxx | 2 +- include/roboptim/core/result-analyzer.hxx | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis b/.travis index bad6dbd29..dc8b946d4 160000 --- a/.travis +++ b/.travis @@ -1 +1 @@ -Subproject commit bad6dbd29cf70e852e5e427e876390d954ca7d6b +Subproject commit dc8b946d456d2c41ad12b819111b005148c68031 diff --git a/.travis.yml b/.travis.yml index eefb25e66..6ff68b3cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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} diff --git a/include/roboptim/core/detail/structured-input.hxx b/include/roboptim/core/detail/structured-input.hxx index 3c1f9bb8d..1226ac2c1 100644 --- a/include/roboptim/core/detail/structured-input.hxx +++ b/include/roboptim/core/detail/structured-input.hxx @@ -59,7 +59,8 @@ namespace roboptim assert(blockInd < BlockProvider::blocks.size()); const std::pair& block = this->BlockProvider::blocks[blockInd]; - return input.segment(block.first, block.second); + return input.segment(static_cast(block.first), + static_cast(block.second)); } template diff --git a/include/roboptim/core/problem.hxx b/include/roboptim/core/problem.hxx index c8308f581..f9bc4b9a5 100644 --- a/include/roboptim/core/problem.hxx +++ b/include/roboptim/core/problem.hxx @@ -518,7 +518,7 @@ namespace roboptim } template <> - inline typename Problem::jacobian_t + inline Problem::jacobian_t Problem::jacobian (const_argument_ref x) const { typedef GenericDifferentiableFunction diff --git a/include/roboptim/core/result-analyzer.hxx b/include/roboptim/core/result-analyzer.hxx index 059c455e8..6b1853883 100644 --- a/include/roboptim/core/result-analyzer.hxx +++ b/include/roboptim/core/result-analyzer.hxx @@ -289,7 +289,7 @@ namespace roboptim } template <> - inline typename ResultAnalyzer::size_type + inline ResultAnalyzer::size_type ResultAnalyzer::computeRank (jacobian_t& jac) const { if (jac.nonZeros () == 0) @@ -428,7 +428,7 @@ namespace roboptim } template <> - typename ResultAnalyzer::gradient_t + ResultAnalyzer::gradient_t inline ResultAnalyzer::gradLagrangian () const { gradient_t grad_L; From 1be99218a517f42757db4e90cd84e4db5a554929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Chr=C3=A9tien?= Date: Sun, 1 Jul 2018 10:36:38 +0200 Subject: [PATCH 3/3] [cmake] Synchronize --- cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake b/cmake index b52dbcf50..bf10c6ca3 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit b52dbcf50991decbe7abf829073daf962c268c8d +Subproject commit bf10c6ca3565b96ab283edaa8f18b5b533e59da9