replace push_back by emplace_back where possible

This commit is contained in:
Konstantinos Margaritis
2021-03-26 12:39:40 +02:00
parent 1cdb7312cb
commit 3f35a2be37
92 changed files with 535 additions and 535 deletions

View File

@@ -113,7 +113,7 @@ void dumpGraph(const char *filename, const LitGraph &lg) {
fout << "[label=\"SINK\"];";
} else {
ue2_literal s;
s.push_back(lg[v].c);
s.emplace_back(lg[v].c);
fout << "[label=\"" << dumpString(s) << "\"];";
}
fout << endl;
@@ -558,12 +558,12 @@ void findMinCut(LitGraph &lg, vector<LitEdge> &cutset) {
if (ucolor != small_color::white && vcolor == small_color::white) {
assert(v != lg.sink);
white_cut.push_back(e);
white_cut.emplace_back(e);
white_flow += lg[e].score;
}
if (ucolor == small_color::black && vcolor != small_color::black) {
assert(v != lg.sink);
black_cut.push_back(e);
black_cut.emplace_back(e);
black_flow += lg[e].score;
}
}
@@ -657,7 +657,7 @@ u64a sanitizeAndCompressAndScore(set<ue2_literal> &lits) {
continue;
dont_explode:
make_nocase(&s);
replacements.push_back(s);
replacements.emplace_back(s);
}
insert(&lits, replacements);