| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
auto [it, inserted] = trial_groups.emplace(trial, group);I personally prefer:
```
bool inserted = some_container_call().second;
if (!inserted) {
...
}
```
Then there is no unused `it` variable.
params[std::move(key)] = std::move(value);Just combine with previous line.
if (enable) {
enabled_features_.emplace_back(std::move(feature_name));
} else {
disabled_features_.emplace_back(std::move(feature_name));
}Can simplify further:
```
auto& container = enable ? enabled_features_ : disabled_features_;
container.emplace_back(...);
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
auto [it, inserted] = trial_groups.emplace(trial, group);I personally prefer:
```
bool inserted = some_container_call().second;
if (!inserted) {
...
}
```Then there is no unused `it` variable.
driveby - you could use placeholder too
`auto [_, inserted] = ...`
e.g. https://source.chromium.org/search?q=%22auto%20%5B_%22&ss=chromium
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
auto [it, inserted] = trial_groups.emplace(trial, group);Will HarrisI personally prefer:
```
bool inserted = some_container_call().second;
if (!inserted) {
...
}
```Then there is no unused `it` variable.
driveby - you could use placeholder too
`auto [_, inserted] = ...`
e.g. https://source.chromium.org/search?q=%22auto%20%5B_%22&ss=chromium
Done, Thanks will
Just combine with previous line.
enabled_features_.emplace_back(std::move(feature_name));
} else {
disabled_features_.emplace_back(std::move(feature_name));
}Can simplify further:
```
auto& container = enable ? enabled_features_ : disabled_features_;
container.emplace_back(...);
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Use emplace and std::move to optimize
- Replace find()+insert() pattern with emplace()
- Use std::move() + emplace
- Use iterators when erasing
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |