Skip to content

Commit

Permalink
use emplace_back
Browse files Browse the repository at this point in the history
  • Loading branch information
wx257osn2 committed Jun 21, 2020
1 parent 1878ae0 commit 6543a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpp/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ inline NodeIndex get_idx(NodeId id) {
inline void add_edge(NodeId start, NodeId end, Distance distance) {
const NodeIndex s = get_idx(start);
const NodeIndex e = get_idx(end);
g.edge[s].push_back({e, distance});
g.edge[s].emplace_back(e, distance);
}

inline int stoi(std::string_view s) {
Expand Down

0 comments on commit 6543a77

Please sign in to comment.