Commit 5c1b994b authored by Zentaro Kavanagh's avatar Zentaro Kavanagh Committed by Commit Bot

ipp_converter: Use push_back where appropriate

- Use push_back instead of emplace_back where appropriate
- See abseil.io/tips/112

Bug: None
Test: manual
Change-Id: I10538be7fd33b4a66da7409f54ac526b18ee6479
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2283765
Auto-Submit: Zentaro Kavanagh <zentaro@chromium.org>
Reviewed-by: default avatarSean Kau <skau@chromium.org>
Commit-Queue: Zentaro Kavanagh <zentaro@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785948}
parent 6273b947
......@@ -119,8 +119,7 @@ std::vector<bool> IppGetBools(ipp_attribute_t* attr) {
std::vector<bool> ret;
for (int i = 0; i < ippGetCount(attr); ++i) {
// No decipherable failure condition for this libCUPS method.
bool v = ippGetBoolean(attr, i);
ret.emplace_back(v);
ret.push_back(ippGetBoolean(attr, i));
}
return ret;
}
......@@ -132,7 +131,7 @@ base::Optional<std::vector<int>> IppGetInts(ipp_attribute_t* attr) {
if (!v) {
return base::nullopt;
}
ret.emplace_back(v);
ret.push_back(v);
}
return ret;
}
......@@ -390,7 +389,7 @@ ipp_parser::mojom::IppMessagePtr ConvertIppToMojo(ipp_t* ipp) {
NOTREACHED();
}
attributes.emplace_back(std::move(attrptr));
attributes.push_back(std::move(attrptr));
}
ret->attributes = std::move(attributes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment