Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Checks: >
cppcoreguidelines-avoid-goto,
cppcoreguidelines-avoid-non-const-global-variables,
cppcoreguidelines-avoid-reference-coroutine-parameters,
cppcoreguidelines-init-variables
cppcoreguidelines-init-variables,
cppcoreguidelines-prefer-member-initializer
Comment thread
cvvergara marked this conversation as resolved.
Outdated

WarningsAsErrors: ''
HeaderFilterRegex: './include'
Expand Down
6 changes: 5 additions & 1 deletion include/cpp_common/assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ class AssertFailedException : public std::exception {
public:
const char *what() const noexcept override;
explicit AssertFailedException(std::string msg);
~AssertFailedException() noexcept override {}
AssertFailedException(const AssertFailedException&) = default;
AssertFailedException& operator=(const AssertFailedException&) = delete;
AssertFailedException(AssertFailedException&&) = default;
AssertFailedException& operator=(AssertFailedException&&) = delete;
~AssertFailedException() noexcept override = default;
};

#endif // INCLUDE_CPP_COMMON_ASSERT_HPP_
4 changes: 3 additions & 1 deletion include/cpp_common/basic_vertex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class Basic_vertex {
id(_id) {}

Basic_vertex& operator=(const Basic_vertex&) = default;

Basic_vertex(Basic_vertex&&) = default;
Basic_vertex& operator=(Basic_vertex&&) = default;
~Basic_vertex() = default;
Basic_vertex(const Edge_t &other, bool is_source) :
id(is_source? other.source : other.target) {}

Expand Down
4 changes: 3 additions & 1 deletion include/cpp_common/messages.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ class Pgr_messages {
Pgr_messages() = default;
Pgr_messages(const Pgr_messages&) = delete;
Pgr_messages& operator=(const Pgr_messages&) = delete;

~Pgr_messages() = default;
Pgr_messages(Pgr_messages&&) = delete;
Pgr_messages& operator=(Pgr_messages&&) = delete;
/*! @brief get_log
*
* \returns the current contents of the log and clears the log
Expand Down
4 changes: 3 additions & 1 deletion include/vrp/fleet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class Fleet {
/*!@}*/

Fleet& operator=(const Fleet &fleet);

~Fleet() = default;
Fleet(Fleet&&) = delete;
Fleet& operator=(Fleet&&) = delete;
void set_compatibles(const PD_Orders &orders);

bool is_fleet_ok() const;
Expand Down
5 changes: 4 additions & 1 deletion include/vrp/pd_problem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ class PD_problem {

/** @brief Not wllowing to copy the problem */
Comment thread
cvvergara marked this conversation as resolved.
PD_problem(const PD_problem &problem) = delete;

PD_problem& operator=(const PD_problem&) = delete;
~PD_problem() = default;
PD_problem(PD_problem&&) = delete;
PD_problem& operator=(PD_problem&&) = delete;
/** @brief Not allowing initialization without information */
PD_problem() = delete;
};
Expand Down