Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: tools/imagediff/image_diff.cc

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More IWYU fails and revert GN cleanup so the right overload is called Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/imagediff/image_diff.cc
diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc
index e9d39bd9819f3932fe63418e73062d14e39dd0ec..56d1be9c077b045e7360475b7955877a11b1d78c 100644
--- a/tools/imagediff/image_diff.cc
+++ b/tools/imagediff/image_diff.cc
@@ -13,6 +13,7 @@
#include <algorithm>
#include <iostream>
+#include <memory>
#include <string>
#include <vector>
@@ -21,7 +22,6 @@
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/process/memory.h"
#include "base/strings/string_util.h"
@@ -84,7 +84,7 @@ class Image {
if (byte_length == 0)
return false;
- scoped_ptr<unsigned char[]> source(new unsigned char[byte_length]);
+ std::unique_ptr<unsigned char[]> source(new unsigned char[byte_length]);
if (fread(source.get(), 1, byte_length, stdin) != byte_length)
return false;

Powered by Google App Engine
This is Rietveld 408576698