Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
34 changes: 24 additions & 10 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
Checks: >
google-*,
-google-readability-casting,
clang-analyzer-*,
clang-diagnostic-*,
cppcoreguidelines-avoid-capturing-lambda-coroutines,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-avoid-non-const-global-variables,
cppcoreguidelines-avoid-reference-coroutine-parameters,
cppcoreguidelines-init-variables
google-*,
Comment thread
cvvergara marked this conversation as resolved.
Outdated
-google-readability-casting,
clang-analyzer-*,
clang-diagnostic-*,
cppcoreguidelines-avoid-capturing-lambda-coroutines,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-avoid-non-const-global-variables,
cppcoreguidelines-avoid-reference-coroutine-parameters,
cppcoreguidelines-init-variables,
cppcoreguidelines-special-member-functions

CheckOptions:
- key: cppcoreguidelines-special-member-functions.DefaultConstructor
value: true
- key: cppcoreguidelines-special-member-functions.CopyConstructor
value: true
- key: cppcoreguidelines-special-member-functions.CopyAssignment
value: true
- key: cppcoreguidelines-special-member-functions.MoveConstructor
value: true
- key: cppcoreguidelines-special-member-functions.MoveAssignment
value: true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

WarningsAsErrors: ''
HeaderFilterRegex: './include'
FormatStyle: none
FormatStyle: none
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
InheritParentConfig: true

5 changes: 5 additions & 0 deletions include/cpp_common/assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ class AssertFailedException : public std::exception {
public:
const char *what() const noexcept override;
explicit AssertFailedException(std::string msg);
AssertFailedException(const AssertFailedException&) = default;
Comment thread
cvvergara marked this conversation as resolved.
Outdated
AssertFailedException(AssertFailedException&&) noexcept = default;
AssertFailedException& operator=(const AssertFailedException&) = delete;
AssertFailedException& operator=(AssertFailedException&&) noexcept = delete;

~AssertFailedException() noexcept override {}
};

Expand Down
5 changes: 4 additions & 1 deletion include/cpp_common/basic_vertex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
namespace pgrouting {

class Basic_vertex {

public:
Basic_vertex() :
id(0) {}
Expand All @@ -52,7 +53,9 @@ class Basic_vertex {
id(_id) {}

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

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

Expand Down
11 changes: 8 additions & 3 deletions include/cpp_common/messages.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

namespace pgrouting {


class Pgr_messages {

public:
Pgr_messages() = default;
Pgr_messages(const Pgr_messages&) = delete;
Pgr_messages& operator=(const Pgr_messages&) = delete;
Pgr_messages() = default;
Comment thread
cvvergara marked this conversation as resolved.
Outdated
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
*
Expand Down
3 changes: 3 additions & 0 deletions include/vrp/fleet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ class Fleet {
/*!@}*/

Fleet& operator=(const Fleet &fleet);
Fleet(Fleet&&) noexcept = default;
Fleet& operator=(Fleet&&) noexcept = default;

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

bool is_fleet_ok() const;
Expand Down
21 changes: 14 additions & 7 deletions include/vrp/pd_problem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,24 @@ namespace vrp {
class Pgr_pickDeliver;

class PD_problem {

Comment thread
cvvergara marked this conversation as resolved.
Outdated
public:
/** @brief Initializing the problem pointer */
explicit PD_problem(Pgr_pickDeliver* p_problem);
/** @brief Initializing the problem pointer */
Comment thread
cvvergara marked this conversation as resolved.
Outdated
explicit PD_problem(Pgr_pickDeliver* p_problem);

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

/** @brief Not allowing initialization without information */
PD_problem() = delete;
};
/** @brief Not allowing move */
Comment thread
cvvergara marked this conversation as resolved.
Outdated
PD_problem(PD_problem&&) = delete;
PD_problem& operator=(PD_problem&&) = delete;

/** @brief Not allowing default construction */
PD_problem() = delete;

~PD_problem() = default;
};
} // namespace vrp
} // namespace pgrouting

Expand Down
Loading