Skip to content

Commit f291699

Browse files
committed
Fixed Uninitialized variable (T feat) #502
1 parent a32c2c0 commit f291699

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/CXXGraph/Graph/IO/InputOperation_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ void Graph<T>::recreateGraph(
388388
shared<Node<T>> node2(nullptr);
389389
if (nodeMap.find(edgeIt.second.first) == nodeMap.end()) {
390390
// Create new Node
391-
T feat;
391+
T feat {};
392392
if (nodeFeatMap.find(edgeIt.second.first) != nodeFeatMap.end()) {
393393
feat = std::move(nodeFeatMap.at(edgeIt.second.first));
394394
}
@@ -399,7 +399,7 @@ void Graph<T>::recreateGraph(
399399
}
400400
if (nodeMap.find(edgeIt.second.second) == nodeMap.end()) {
401401
// Create new Node
402-
T feat;
402+
T feat {};
403403
if (nodeFeatMap.find(edgeIt.second.second) != nodeFeatMap.end()) {
404404
feat = std::move(nodeFeatMap.at(edgeIt.second.second));
405405
}

0 commit comments

Comments
 (0)