Skip to content

Commit b0b4670

Browse files
committed
clang-tidy: add cppcoreguidelines-special-member-functions
1 parent 5d76cc6 commit b0b4670

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

include/vrp/solution.hpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,15 @@ class Solution {
6161
*
6262
*/
6363
Solution();
64+
~Solution() = default; // destructor
6465

6566

67+
/* copy operations */
68+
Solution(const Solution&) = default;
69+
Solution& operator=(const Solution&) = default;
6670

67-
/* @brief copy constructor */
68-
Solution(const Solution &sol) :
69-
EPSILON(0.0001),
70-
fleet(sol.fleet),
71-
trucks(sol.trucks)
72-
{};
73-
74-
/* @brief copy assignment */
75-
Solution& operator = (const Solution& sol) {
76-
EPSILON = 0.0001,
77-
fleet = sol.fleet;
78-
trucks = sol.trucks;
79-
return *this;
80-
};
81-
71+
Solution(Solution&&) = default;
72+
Solution& operator=(Solution&&) = default;
8273

8374
Initials_code get_kind() const;
8475

0 commit comments

Comments
 (0)