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

Unified Diff: courgette/assembly_program.cc

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/assembly_program.h ('k') | courgette/courgette_tool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/assembly_program.cc
diff --git a/courgette/assembly_program.cc b/courgette/assembly_program.cc
index de843f1329050e46d10da2cbb4eef90a74d7711a..5344cff95f84868f83c670b143b88f9fef736564 100644
--- a/courgette/assembly_program.cc
+++ b/courgette/assembly_program.cc
@@ -8,6 +8,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <memory>
#include <utility>
#include <vector>
@@ -361,8 +362,8 @@ void AssemblyProgram::AssignRemainingIndexes(RVAToLabel* labels) {
<< " infill " << fill_infill_count;
}
-scoped_ptr<EncodedProgram> AssemblyProgram::Encode() const {
- scoped_ptr<EncodedProgram> encoded(new EncodedProgram());
+std::unique_ptr<EncodedProgram> AssemblyProgram::Encode() const {
+ std::unique_ptr<EncodedProgram> encoded(new EncodedProgram());
encoded->set_image_base(image_base_);
@@ -527,7 +528,7 @@ CheckBool AssemblyProgram::TrimLabels() {
////////////////////////////////////////////////////////////////////////////////
Status Encode(const AssemblyProgram& program,
- scoped_ptr<EncodedProgram>* output) {
+ std::unique_ptr<EncodedProgram>* output) {
// Explicitly release any memory associated with the output before encoding.
output->reset();
« no previous file with comments | « courgette/assembly_program.h ('k') | courgette/courgette_tool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698