Skip to content

Commit c62f17b

Browse files
committed
Declare empty destructors using default
Types with user defined destructors (even empty) are not trivially destructible. This change allows further compiler optimizations.
1 parent 6442be2 commit c62f17b

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

include/CXXGraph/Partitioning/CoordinatedPartitionState.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ CoordinatedPartitionState<T>::CoordinatedPartitionState(const Globals &G)
104104
}
105105

106106
template <typename T>
107-
CoordinatedPartitionState<T>::~CoordinatedPartitionState() {}
107+
CoordinatedPartitionState<T>::~CoordinatedPartitionState() = default;
108108

109109
template <typename T>
110110
std::shared_ptr<Record<T>> CoordinatedPartitionState<T>::getRecord(

include/CXXGraph/Partitioning/EBV.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ EBV<T>::EBV(const Globals &G) : GLOBALS(G) {
6565
// this->GLOBALS = G;
6666
}
6767
template <typename T>
68-
EBV<T>::~EBV() {}
68+
EBV<T>::~EBV() = default;
6969
template <typename T>
7070
void EBV<T>::performStep(shared<const Edge<T>> e,
7171
shared<PartitionState<T>> state) {

include/CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ EdgeBalancedVertexCut<T>::EdgeBalancedVertexCut(const Globals &G) : GLOBALS(G) {
6363
// this->GLOBALS = G;
6464
}
6565
template <typename T>
66-
EdgeBalancedVertexCut<T>::~EdgeBalancedVertexCut() {}
66+
EdgeBalancedVertexCut<T>::~EdgeBalancedVertexCut() = default;
6767
template <typename T>
6868
void EdgeBalancedVertexCut<T>::performStep(shared<const Edge<T>> e,
6969
shared<PartitionState<T>> state) {

include/CXXGraph/Partitioning/GreedyVertexCut.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ template <typename T>
6565
GreedyVertexCut<T>::GreedyVertexCut(const Globals &G) : GLOBALS(G) {}
6666

6767
template <typename T>
68-
GreedyVertexCut<T>::~GreedyVertexCut() {}
68+
GreedyVertexCut<T>::~GreedyVertexCut() = default;
6969

7070
template <typename T>
7171
void GreedyVertexCut<T>::performStep(shared<const Edge<T>> e,

include/CXXGraph/Partitioning/HDRF.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ HDRF<T>::HDRF(const Globals &G) : GLOBALS(G) {
6565
// this->GLOBALS = G;
6666
}
6767
template <typename T>
68-
HDRF<T>::~HDRF() {}
68+
HDRF<T>::~HDRF() = default;
6969
template <typename T>
7070
void HDRF<T>::performStep(shared<const Edge<T>> e,
7171
shared<PartitionState<T>> state) {

include/CXXGraph/Partitioning/PartitionerThread.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PartitionerThread<T>::PartitionerThread(
5858
this->algorithm = algorithm;
5959
}
6060
template <typename T>
61-
PartitionerThread<T>::~PartitionerThread() {}
61+
PartitionerThread<T>::~PartitionerThread() = default;
6262
template <typename T>
6363
void PartitionerThread<T>::run() {
6464
for (const auto &edge_it : list) {

include/CXXGraph/Partitioning/Utility/Globals.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ inline Globals::Globals(const int numberOfPartiton,
7272
}
7373
}
7474

75-
inline Globals::~Globals() {}
75+
inline Globals::~Globals() = default;
7676

7777
inline const std::string Globals::print() const {
7878
std::string prt_str;

include/CXXGraph/Partitioning/WeightBalancedLibra.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ WeightBalancedLibra<T>::WeightBalancedLibra(
6161
weight_sum_bound(_weight_sum_bound),
6262
vertices_degrees(_vertices_degrees) {}
6363
template <typename T>
64-
WeightBalancedLibra<T>::~WeightBalancedLibra() {}
64+
WeightBalancedLibra<T>::~WeightBalancedLibra() = default;
6565
template <typename T>
6666
void WeightBalancedLibra<T>::performStep(shared<const Edge<T>> e,
6767
shared<PartitionState<T>> state) {

0 commit comments

Comments
 (0)