Skip to content

Commit f2f7d90

Browse files
authored
Clean up compiler warnings (#451)
1 parent fe6758a commit f2f7d90

File tree

6 files changed

+3
-10
lines changed

6 files changed

+3
-10
lines changed

include/CXXGraph/Edge/Edge_decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Edge {
5959
virtual ~Edge() = default;
6060
void setFirstNode(shared<const Node<T>> node);
6161
void setSecondNode(shared<const Node<T>> node);
62-
const unsigned long long getId() const;
62+
unsigned long long getId() const;
6363
const std::pair<shared<const Node<T>>, shared<const Node<T>>> &getNodePair()
6464
const;
6565
shared<const Node<T>> getOtherNode(shared<const Node<T>> node) const;

include/CXXGraph/Edge/Edge_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void Edge<T>::setSecondNode(shared<const Node<T>> node) {
7979
}
8080

8181
template <typename T>
82-
const unsigned long long Edge<T>::getId() const {
82+
unsigned long long Edge<T>::getId() const {
8383
return id;
8484
}
8585

include/CXXGraph/Graph/Algorithm/CycleDetection_impl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ bool Graph<T>::isCyclicDirectedGraphDFS() const {
4646
for (const auto &node : nodeSet) {
4747
state[node->getId()] = not_visited;
4848
}
49-
int stateCounter = 0;
5049

5150
// Start visiting each node.
5251
for (const auto &node : nodeSet) {

include/CXXGraph/Partitioning/EdgeBalancedVertexCut.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ void EdgeBalancedVertexCut<T>::performStep(shared<const Edge<T>> e,
104104
//*** Check which partition has the less load
105105
int MIN_LOAD = state->getMachineLoad(0);
106106
int machine_id = 0;
107-
double MAX_SCORE = 0.0;
108107

109108
for (int m = 0; m < P; m++) {
110109
int load = state->getMachineLoad(m);

include/CXXGraph/Partitioning/Partition.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ unsigned int getMinNodesLoad(const PartitionMap<T> &partitionMap) {
274274

275275
template <typename T>
276276
unsigned int getNumberOfEdges(const PartitionMap<T> &partitionMap) {
277-
unsigned int numberOfEdges = 0;
278277
T_EdgeSet<T> edgeSet;
279278

280279
for (const auto &it : partitionMap) {
@@ -289,7 +288,6 @@ unsigned int getNumberOfEdges(const PartitionMap<T> &partitionMap) {
289288

290289
template <typename T>
291290
unsigned int getNumberOfNodes(const PartitionMap<T> &partitionMap) {
292-
unsigned int numberOfNodes = 0;
293291
std::unordered_set<shared<const Node<T>>, nodeHash<T>> nodeSet;
294292

295293
for (const auto &it : partitionMap) {
@@ -358,8 +356,7 @@ std::ostream &operator<<(std::ostream &os, const Partition<T> &partition) {
358356
os << *std::static_pointer_cast<const UndirectedEdge<T>>(*it) << "\n";
359357
} else {
360358
// Should never happens
361-
os << "Wrong Edge Class"
362-
<< "\n";
359+
os << "Wrong Edge Class" << "\n";
363360
}
364361
}
365362
return os;

include/CXXGraph/Partitioning/WeightBalancedLibra.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ void WeightBalancedLibra<T>::performStep(shared<const Edge<T>> e,
138138

139139
// according to paper, s refers to node with lower degree, t = {u, v} -
140140
// {s}
141-
size_t s_node = (u_degree > v_degree) ? v : u;
142-
size_t t_node = (u_degree > v_degree) ? u : v;
143141
const std::set<int> &s_partition =
144142
(u_degree > v_degree) ? v_partition : u_partition;
145143
const std::set<int> &t_partition =

0 commit comments

Comments
 (0)