diff --git a/benchmarks/linear_programming/cuopt/initial_problem_check.hpp b/benchmarks/linear_programming/cuopt/initial_problem_check.hpp index a90a6f2bc6..44071229e6 100644 --- a/benchmarks/linear_programming/cuopt/initial_problem_check.hpp +++ b/benchmarks/linear_programming/cuopt/initial_problem_check.hpp @@ -16,7 +16,7 @@ double combine_finite_abs_bounds(f_t lower, f_t upper) template struct violation { - violation() {} + violation() = default; violation(f_t* _scalar) {} __device__ __host__ f_t operator()(f_t value, f_t lower, f_t upper) { diff --git a/cpp/include/cuopt/mathematical_optimization/utilities/internals.hpp b/cpp/include/cuopt/mathematical_optimization/utilities/internals.hpp index aaec8ef842..25f3f34f7b 100644 --- a/cpp/include/cuopt/mathematical_optimization/utilities/internals.hpp +++ b/cpp/include/cuopt/mathematical_optimization/utilities/internals.hpp @@ -18,7 +18,7 @@ namespace internals { class Callback { public: - virtual ~Callback() {} + virtual ~Callback() = default; }; enum class base_solution_callback_type { GET_SOLUTION, SET_SOLUTION }; diff --git a/cpp/src/branch_and_bound/branch_and_bound.cpp b/cpp/src/branch_and_bound/branch_and_bound.cpp index 0e39fe4a50..4dc6bc67a8 100644 --- a/cpp/src/branch_and_bound/branch_and_bound.cpp +++ b/cpp/src/branch_and_bound/branch_and_bound.cpp @@ -1117,7 +1117,8 @@ struct nondeterministic_policy_t : tree_update_policy_t { tree.graphviz_node(log, node, label, value); } - void on_node_completed(mip_node_t*, node_status_t, branch_direction_t) override {} + void on_node_completed(mip_node_t*, node_status_t, branch_direction_t) override + { /* no-op */ } }; template @@ -1145,8 +1146,9 @@ struct deterministic_policy_base_t : tree_update_policy_t { } } - void on_numerical_issue(mip_node_t*) override {} - void graphviz(search_tree_t&, mip_node_t*, const char*, f_t) override {} + void on_numerical_issue(mip_node_t*) override { /* no-op */ } + void graphviz(search_tree_t&, mip_node_t*, const char*, f_t) override + { /* no-op */ } }; template @@ -1290,7 +1292,7 @@ struct deterministic_diving_policy_t void update_objective_estimate(mip_node_t* node, const std::vector& fractional, const std::vector& x) override - { + { /* no-op */ } void on_node_completed(mip_node_t* node, diff --git a/cpp/src/branch_and_bound/deterministic_workers.hpp b/cpp/src/branch_and_bound/deterministic_workers.hpp index 2ac7afcc04..4de3086e61 100644 --- a/cpp/src/branch_and_bound/deterministic_workers.hpp +++ b/cpp/src/branch_and_bound/deterministic_workers.hpp @@ -453,7 +453,7 @@ class deterministic_diving_worker_pool_t } void collect_worker_events(deterministic_diving_worker_t&, bb_event_batch_t&) - { + { /* no-op */ } }; diff --git a/cpp/src/cuts/cuts.hpp b/cpp/src/cuts/cuts.hpp index a302be2f3b..78091c85f6 100644 --- a/cpp/src/cuts/cuts.hpp +++ b/cpp/src/cuts/cuts.hpp @@ -794,7 +794,7 @@ class scratch_pad_t { template class mixed_integer_gomory_cut_t { public: - mixed_integer_gomory_cut_t() {} + mixed_integer_gomory_cut_t() = default; }; template diff --git a/cpp/tests/distance_engine/waypoint_matrix_test.cpp b/cpp/tests/distance_engine/waypoint_matrix_test.cpp index 2db3953c2f..88d4c53229 100644 --- a/cpp/tests/distance_engine/waypoint_matrix_test.cpp +++ b/cpp/tests/distance_engine/waypoint_matrix_test.cpp @@ -22,7 +22,7 @@ class waypoint_matrix_waypoints_sequence_test_t public ::testing::TestWithParam< waypoint_matrix_params_t, i_t, f_t>> { public: - waypoint_matrix_waypoints_sequence_test_t() {} + waypoint_matrix_waypoints_sequence_test_t() = default; void SetUp() override { @@ -44,7 +44,7 @@ class waypoint_matrix_waypoints_sequence_test_t this->expected_sequence_offsets = param.sequence_offsets; } - void TearDown() override {} + void TearDown() override { /* no-op */ } void test_compute_waypoint_sequence() { @@ -111,7 +111,7 @@ class waypoint_matrix_shortest_path_cost_t public ::testing::TestWithParam< waypoint_matrix_params_t, i_t, f_t>> { public: - waypoint_matrix_shortest_path_cost_t() {} + waypoint_matrix_shortest_path_cost_t() = default; void SetUp() override { @@ -131,7 +131,7 @@ class waypoint_matrix_shortest_path_cost_t this->weights.data()); } - void TearDown() override {} + void TearDown() override { /* no-op */ } void test_compute_shortest_path_costs() { @@ -173,7 +173,7 @@ class waypoint_matrix_cost_matrix_test_t : public base_test_t, public ::testing::TestWithParam, i_t, f_t>> { public: - waypoint_matrix_cost_matrix_test_t() {} + waypoint_matrix_cost_matrix_test_t() = default; void SetUp() override { @@ -192,7 +192,7 @@ class waypoint_matrix_cost_matrix_test_t this->weights.data()); } - void TearDown() override {} + void TearDown() override { /* no-op */ } void test_compute_cost_matrix() { diff --git a/cpp/tests/linear_programming/grpc/grpc_client_test.cpp b/cpp/tests/linear_programming/grpc/grpc_client_test.cpp index 0d3b7301cc..77fa158893 100644 --- a/cpp/tests/linear_programming/grpc/grpc_client_test.cpp +++ b/cpp/tests/linear_programming/grpc/grpc_client_test.cpp @@ -1460,7 +1460,7 @@ class MockLogStream : public grpc::ClientReaderInterface messages_;