Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use emplace_back
Browse files Browse the repository at this point in the history
wx257osn2 committed Jun 21, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7527a19 commit 7d90ee4
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
@@ -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);
}

// 123.4567 --> 12345

0 comments on commit 7d90ee4

Please sign in to comment.