refactoring: use std::make_unique<T> (#13245)

This commit is contained in:
Milan Burda 2018-06-18 09:32:55 +02:00 committed by Cheng Zhao
parent 4dec5ec5f9
commit 28fd571d0c
29 changed files with 64 additions and 86 deletions

View file

@ -336,7 +336,7 @@ v8::Local<v8::Value> BrowserWindow::GetWebContents(v8::Isolate* isolate) {
// Convert draggable regions in raw format to SkRegion format.
std::unique_ptr<SkRegion> BrowserWindow::DraggableRegionsToSkRegion(
const std::vector<DraggableRegion>& regions) {
std::unique_ptr<SkRegion> sk_region(new SkRegion);
auto sk_region = std::make_unique<SkRegion>();
for (const DraggableRegion& region : regions) {
sk_region->op(
region.bounds.x(), region.bounds.y(), region.bounds.right(),