Skip to content

Commit

Permalink
Fix minor regressions in 4.2.0 (#4538)
Browse files Browse the repository at this point in the history
Fixes #4537

Description of changes:
- use proper integral sizes
- remove unused code
  • Loading branch information
kodiakhq[bot] authored and jngrad committed Apr 17, 2023
1 parent 3e9a6bf commit dce211d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
13 changes: 0 additions & 13 deletions src/scafacos/src/Scafacos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#include "utils.hpp"

#include <algorithm>
#include <string>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -71,18 +70,6 @@ std::vector<std::string> Scafacos::available_methods() {
return methods;
}

static std::string parse_method_parameters(
std::vector<std::vector<std::string>> const &parameters) {
std::string method_params = "";
for (auto const &parameter : parameters) {
for (auto const &value : parameter) {
method_params += " " + value;
}
}
std::replace(method_params.begin(), method_params.end(), ' ', ',');
return method_params.substr(1);
}

Scafacos::Scafacos(MPI_Comm comm, std::string method, std::string parameters)
: m_method_name{std::move(method)}, m_parameters{std::move(parameters)} {

Expand Down
6 changes: 3 additions & 3 deletions src/utils/tests/integral_parameter_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ BOOST_AUTO_TEST_CASE(integral_parameter_) {
std::pair<std::size_t, int>>::value,
"");

BOOST_CHECK(std::make_pair(1ul, 13) ==
BOOST_CHECK(std::make_pair(std::size_t{1u}, 13) ==
(Utils::integral_parameter<F, 1, 5>(1, 13)));
BOOST_CHECK(std::make_pair(3ul, 13) ==
BOOST_CHECK(std::make_pair(std::size_t{3u}, 13) ==
(Utils::integral_parameter<F, 1, 5>(3, 13)));
BOOST_CHECK(std::make_pair(5ul, 13) ==
BOOST_CHECK(std::make_pair(std::size_t{5u}, 13) ==
(Utils::integral_parameter<F, 1, 5>(5, 13)));
BOOST_CHECK_THROW((Utils::integral_parameter<F, 1, 5>(6, 13)),
std::exception);
Expand Down

0 comments on commit dce211d

Please sign in to comment.