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

Unified Diff: courgette/patcher_x86_32.h

Issue 1855133002: convert //courgette to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comment in memory_allocator.h 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
« no previous file with comments | « courgette/patch_generator_x86_32.h ('k') | courgette/program_detector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/patcher_x86_32.h
diff --git a/courgette/patcher_x86_32.h b/courgette/patcher_x86_32.h
index a80ccc3daa95cd8e71fa11757d4f86e22d43a949..c5f4e3c0a4c15de7a3f7644ffe9dfc30f735b11d 100644
--- a/courgette/patcher_x86_32.h
+++ b/courgette/patcher_x86_32.h
@@ -7,8 +7,9 @@
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "courgette/assembly_program.h"
#include "courgette/encoded_program.h"
#include "courgette/ensemble.h"
@@ -52,14 +53,14 @@ class PatcherX86_32 : public TransformationPatcher {
if (!corrected_parameters->Empty())
return C_GENERAL_ERROR; // Don't expect any corrected parameters.
- scoped_ptr<AssemblyProgram> program;
+ std::unique_ptr<AssemblyProgram> program;
status = ParseDetectedExecutable(ensemble_region_.start() + base_offset_,
base_length_,
&program);
if (status != C_OK)
return status;
- scoped_ptr<EncodedProgram> encoded;
+ std::unique_ptr<EncodedProgram> encoded;
status = Encode(*program, &encoded);
if (status != C_OK)
return status;
@@ -72,7 +73,7 @@ class PatcherX86_32 : public TransformationPatcher {
Status Reform(SourceStreamSet* transformed_element,
SinkStream* reformed_element) {
Status status;
- scoped_ptr<EncodedProgram> encoded_program;
+ std::unique_ptr<EncodedProgram> encoded_program;
status = ReadEncodedProgram(transformed_element, &encoded_program);
if (status != C_OK)
return status;
« no previous file with comments | « courgette/patch_generator_x86_32.h ('k') | courgette/program_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698