- Fixed logic error with making graph connections regarding connection objects
This commit is contained in:
@@ -122,7 +122,15 @@ public:
|
||||
_conn_map.resize(_node_pool.capacity());
|
||||
}
|
||||
|
||||
size_t conn = _conn_pool.emplace(fennec::forward<ArgsT>(args)...);
|
||||
auto it = _conn_map[a][b];
|
||||
size_t conn;
|
||||
if (it != nullptr) {
|
||||
conn = *it;
|
||||
_conn_pool[conn] = node_t(fennec::forward<ArgsT>(args)...);
|
||||
} else {
|
||||
conn = _conn_pool.emplace(fennec::forward<ArgsT>(args)...);
|
||||
}
|
||||
|
||||
_conn_map[a].emplace(b, conn);
|
||||
_conn_map[b].emplace(a, conn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user