diff --git a/external/modparser b/external/modparser index 588ca1a5ea28ef04d17b318e754d479e5489eb9a..b200bf6376a2dc30edea98fcc2375fc9be095135 160000 --- a/external/modparser +++ b/external/modparser @@ -1 +1 @@ -Subproject commit 588ca1a5ea28ef04d17b318e754d479e5489eb9a +Subproject commit b200bf6376a2dc30edea98fcc2375fc9be095135 diff --git a/src/algorithms.hpp b/src/algorithms.hpp index 65cbf4b60c973a6b9ca987a0399a3803cddc8459..7789b24156d403ba702404ccf67a67d0b2cfcedf 100644 --- a/src/algorithms.hpp +++ b/src/algorithms.hpp @@ -141,7 +141,7 @@ bool has_contiguous_segments(const C& parent_index) return false; } - if(p != i-1) { + if(p != decltype(p)(i-1)) { // we have a branch and i-1 is a leaf node is_leaf[i-1] = true; } @@ -174,7 +174,7 @@ std::vector<typename C::value_type> branches(const C& parent_index) "integral type required" ); - EXPECTS(has_contiguous_segments(parent_index)); + //EXPECTS(has_contiguous_segments(parent_index)); std::vector<typename C::value_type> branch_index; if (parent_index.empty()) { @@ -250,7 +250,7 @@ std::vector<typename C::value_type> make_parent_index( } EXPECTS(parent_index.size() == unsigned(branch_index.back())); - EXPECTS(has_contiguous_segments(parent_index)); + //EXPECTS(has_contiguous_segments(parent_index)); EXPECTS(is_strictly_monotonic_increasing(branch_index)); // expand the branch index diff --git a/tests/unit/test_compartments.cpp b/tests/unit/test_compartments.cpp index 3ca0acbcabf995637b77c79173431e34e449617f..c167b16cce5585a43efc13fc9f136025b21f7811 100644 --- a/tests/unit/test_compartments.cpp +++ b/tests/unit/test_compartments.cpp @@ -108,11 +108,11 @@ TEST(compartments, compartment_range) { nest::mc::compartment_range rng(10, 1.0, 2.0, 10.); - EXPECT_EQ((*rng.begin()).index, 0); - EXPECT_EQ((*rng.end()).index, 10); + EXPECT_EQ((*rng.begin()).index, 0u); + EXPECT_EQ((*rng.end()).index, 10u); EXPECT_NE(rng.begin(), rng.end()); - int count = 0; + unsigned count = 0; for(auto c : rng) { EXPECT_EQ(c.index, count); auto er = 1.0 + double(count)/10.; @@ -121,7 +121,7 @@ TEST(compartments, compartment_range) EXPECT_EQ(c.length, 1.0); ++count; } - EXPECT_EQ(count, 10); + EXPECT_EQ(count, 10u); } // test case of zero length range