mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Better readability and optimization insertion into container by replacing 'insert' -> 'emplace', 'push_back' -> 'emplace_back'
This commit is contained in:
1 parent
c953bf7fc7
commit
3cdf72b68b
20 files changed
+49
-49
No files matched your search
@@ -219,9 +219,9 @@ bool SetRestrictPrims(const char *rule) {
|
||||
// If there's nothing yet, add everything else.
|
||||
if (updated.empty()) {
|
||||
if (range.first > 0)
|
||||
updated.push_back(std::make_pair(0, range.first - 1));
|
||||
updated.emplace_back(0, range.first - 1);
|
||||
if (range.second < MAX_PRIMS)
|
||||
updated.push_back(std::make_pair(range.second + 1, MAX_PRIMS));
|
||||
updated.emplace_back(range.second + 1, MAX_PRIMS);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ bool SetRestrictPrims(const char *rule) {
|
||||
// We're slicing a hole in this subrange.
|
||||
int next = sub.second;
|
||||
sub.second = range.first - 1;
|
||||
updated.push_back(std::make_pair(range.second + 1, next));
|
||||
updated.emplace_back(range.second + 1, next);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user