Skip to content

Commit 3169003

Browse files
Put edge comparision functors in anonymous namespaces
This helps with potential linkage errors
1 parent 942c11d commit 3169003

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libs/librrgraph/src/base/rr_graph_storage.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void t_rr_graph_storage::init_fan_in() {
137137
}
138138
}
139139

140-
140+
namespace {
141141
/// Functor for sorting edges according to destination node's ID.
142142
class edge_compare_dest_node {
143143
public:
@@ -153,6 +153,7 @@ class edge_compare_dest_node {
153153
private:
154154
const t_rr_graph_storage& rr_graph_storage_;
155155
};
156+
} // namespace
156157

157158
size_t t_rr_graph_storage::count_rr_switches(const std::vector<t_arch_switch_inf>& arch_switch_inf,
158159
t_arch_switch_fanin& arch_switch_fanins) {
@@ -259,6 +260,7 @@ void t_rr_graph_storage::mark_edges_as_rr_switch_ids() {
259260
remapped_edges_ = true;
260261
}
261262

263+
namespace{
262264
/// Functor for sorting edges according to source node, with configurable edges coming first
263265
class edge_compare_src_node_and_configurable_first {
264266
public:
@@ -285,6 +287,7 @@ class edge_compare_src_node_and_configurable_first {
285287
const vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switch_inf_;
286288
const t_rr_graph_storage& rr_graph_storage_;
287289
};
290+
} // namespace
288291

289292
void t_rr_graph_storage::partition_edges(const vtr::vector<RRSwitchId, t_rr_switch_inf>& rr_switches) {
290293
if (partitioned_) {

0 commit comments

Comments
 (0)