Skip to content

Commit 12ebc1e

Browse files
clang-tidy: add cppcoreguidelines-special-member-functions (#3021)
* clang-tidy: add cppcoreguidelines-special-member-functions * fix special-member-functions warnings --------- * Update locale: commit 3a4c3a2 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent d073dff commit 12ebc1e

8 files changed

Lines changed: 30 additions & 16 deletions

File tree

.clang-tidy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Checks: >
88
cppcoreguidelines-avoid-non-const-global-variables,
99
cppcoreguidelines-avoid-reference-coroutine-parameters,
1010
cppcoreguidelines-init-variables,
11-
cppcoreguidelines-prefer-member-initializer
11+
cppcoreguidelines-prefer-member-initializer,
12+
cppcoreguidelines-special-member-functions
1213
1314
WarningsAsErrors: ''
1415
HeaderFilterRegex: './include'

include/cpp_common/assert.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ class AssertFailedException : public std::exception {
145145
public:
146146
const char *what() const noexcept override;
147147
explicit AssertFailedException(std::string msg);
148-
~AssertFailedException() noexcept override {}
148+
AssertFailedException(const AssertFailedException&) = default;
149+
AssertFailedException& operator=(const AssertFailedException&) = delete;
150+
AssertFailedException(AssertFailedException&&) = default;
151+
AssertFailedException& operator=(AssertFailedException&&) = delete;
152+
~AssertFailedException() noexcept override = default;
149153
};
150154

151155
#endif // INCLUDE_CPP_COMMON_ASSERT_HPP_

include/cpp_common/basic_vertex.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ class Basic_vertex {
5252
id(_id) {}
5353

5454
Basic_vertex& operator=(const Basic_vertex&) = default;
55-
55+
Basic_vertex(Basic_vertex&&) = default;
56+
Basic_vertex& operator=(Basic_vertex&&) = default;
57+
~Basic_vertex() = default;
5658
Basic_vertex(const Edge_t &other, bool is_source) :
5759
id(is_source? other.source : other.target) {}
5860

include/cpp_common/messages.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ class Pgr_messages {
4040
Pgr_messages() = default;
4141
Pgr_messages(const Pgr_messages&) = delete;
4242
Pgr_messages& operator=(const Pgr_messages&) = delete;
43-
43+
~Pgr_messages() = default;
44+
Pgr_messages(Pgr_messages&&) = delete;
45+
Pgr_messages& operator=(Pgr_messages&&) = delete;
4446
/*! @brief get_log
4547
*
4648
* \returns the current contents of the log and clears the log

include/vrp/fleet.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ class Fleet {
6262
/*!@}*/
6363

6464
Fleet& operator=(const Fleet &fleet);
65-
65+
~Fleet() = default;
66+
Fleet(Fleet&&) = delete;
67+
Fleet& operator=(Fleet&&) = delete;
6668
void set_compatibles(const PD_Orders &orders);
6769

6870
bool is_fleet_ok() const;

include/vrp/pd_problem.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ class PD_problem {
4545

4646
/** @brief Not wllowing to copy the problem */
4747
PD_problem(const PD_problem &problem) = delete;
48-
48+
PD_problem& operator=(const PD_problem&) = delete;
49+
~PD_problem() = default;
50+
PD_problem(PD_problem&&) = delete;
51+
PD_problem& operator=(PD_problem&&) = delete;
4952
/** @brief Not allowing initialization without information */
5053
PD_problem() = delete;
5154
};

locale/en/LC_MESSAGES/pgrouting_doc_strings.po

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: pgRouting v4.1\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2026-01-04 17:37+0000\n"
11+
"POT-Creation-Date: 2026-01-06 18:37+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -8326,7 +8326,7 @@ msgstr ""
83268326
msgid "Individuals in this release v4.0.0 (in alphabetical order)"
83278327
msgstr ""
83288328

8329-
msgid "Bipasha Gayary, Fan Wu, Regina Obe, Saloni kumari, Vicky Vergara"
8329+
msgid "Mohit Rawat, Regina Obe, Vicky Vergara"
83308330
msgstr ""
83318331

83328332
msgid ""
@@ -8394,11 +8394,11 @@ msgid ""
83948394
"Frederic Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu, Himanshu "
83958395
"Raj, Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko "
83968396
"Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, Martin Wiesenhaan, Maxim "
8397-
"Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mukul Priya, Nitish "
8398-
"Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, Saloni "
8399-
"Kumari, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, Stephen "
8400-
"Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit Kumar, "
8401-
"Vidhan Jain, Virginia Vergara, Yige Huang"
8397+
"Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mohit Rawat, Mukul "
8398+
"Priya, Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith "
8399+
"Reddy, Saloni Kumari, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, "
8400+
"Stephen Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit "
8401+
"Kumar, Vidhan Jain, Virginia Vergara, Yige Huang"
84028402
msgstr ""
84038403

84048404
msgid "Corporate Sponsors (in alphabetical order)"

locale/pot/pgrouting_doc_strings.pot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: pgRouting v4.1\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2026-01-04 17:37+0000\n"
11+
"POT-Creation-Date: 2026-01-06 18:37+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -7147,7 +7147,7 @@ msgstr ""
71477147
msgid "Individuals in this release v4.0.0 (in alphabetical order)"
71487148
msgstr ""
71497149

7150-
msgid "Bipasha Gayary, Fan Wu, Regina Obe, Saloni kumari, Vicky Vergara"
7150+
msgid "Mohit Rawat, Regina Obe, Vicky Vergara"
71517151
msgstr ""
71527152

71537153
msgid "And all the people that give us a little of their time making comments, finding issues, making pull requests etc. in any of our products: osm2pgrouting, pgRouting, pgRoutingLayer, workshop."
@@ -7201,7 +7201,7 @@ msgstr ""
72017201
msgid "Individuals (in alphabetical order)"
72027202
msgstr ""
72037203

7204-
msgid "Aasheesh Tiwari, Abhinav Jain, Aditya Pratap Singh, Adrien Berchet, Akio Takubo, Andrea Nardelli, Anthony Tasca, Anton Patrushev, Aryan Gupta, Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, Bipasha Gayary, Cayetano Benavent, Christian Gonzalez, Daniel Kastl, Dapeng Wang, Dave Potts, David Techer, Denis Rykov, Ema Miyawaki, Esteban Zimanyi, Fan Wu, Florian Thurkow, Frederic Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu, Himanshu Raj, Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, Martin Wiesenhaan, Maxim Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mukul Priya, Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, Saloni Kumari, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, Stephen Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit Kumar, Vidhan Jain, Virginia Vergara, Yige Huang"
7204+
msgid "Aasheesh Tiwari, Abhinav Jain, Aditya Pratap Singh, Adrien Berchet, Akio Takubo, Andrea Nardelli, Anthony Tasca, Anton Patrushev, Aryan Gupta, Ashraf Hossain, Ashish Kumar, Aurélie Bousquet, Bipasha Gayary, Cayetano Benavent, Christian Gonzalez, Daniel Kastl, Dapeng Wang, Dave Potts, David Techer, Denis Rykov, Ema Miyawaki, Esteban Zimanyi, Fan Wu, Florian Thurkow, Frederic Junod, Gerald Fenoy, Gudesa Venkata Sai Akhil, Hang Wu, Himanshu Raj, Imre Samu, Jay Mahadeokar, Jinfu Leng, Kai Behncke, Kishore Kumar, Ko Nagase, Mahmoud Sakr, Manikata Kondeti, Mario Basa, Martin Wiesenhaan, Maxim Dubinin, Maoguang Wang, Mohamed Bakli, Mohamed Zia, Mohit Rawat, Mukul Priya, Nitish Chauhan, Rajat Shinde, Razequl Islam, Regina Obe, Rohith Reddy, Saloni Kumari, Sarthak Agarwal, Shobhit Chaurasia, Sourabh Garg, Stephen Woodbridge, Swapnil Joshi, Sylvain Housseman, Sylvain Pasche, Veenit Kumar, Vidhan Jain, Virginia Vergara, Yige Huang"
72057205
msgstr ""
72067206

72077207
msgid "Corporate Sponsors (in alphabetical order)"

0 commit comments

Comments
 (0)