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

Unified Diff: courgette/assembly_program.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/adjustment_method_unittest.cc ('k') | courgette/assembly_program.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/assembly_program.h
diff --git a/courgette/assembly_program.h b/courgette/assembly_program.h
index 65147a8c04d5137b30f39b424f78ad080a256529..2d157dd480d6cd65149f46139a588c1a39b551f1 100644
--- a/courgette/assembly_program.h
+++ b/courgette/assembly_program.h
@@ -9,12 +9,12 @@
#include <stdint.h>
#include <map>
+#include <memory>
#include <set>
#include <vector>
#include "base/macros.h"
#include "base/memory/free_deleter.h"
-#include "base/memory/scoped_ptr.h"
#include "courgette/courgette.h"
#include "courgette/image_utils.h"
#include "courgette/label_manager.h"
@@ -133,7 +133,7 @@ class AssemblyProgram {
void UnassignIndexes();
void AssignRemainingIndexes();
- scoped_ptr<EncodedProgram> Encode() const;
+ std::unique_ptr<EncodedProgram> Encode() const;
// Accessor for instruction list.
const InstructionVector& instructions() const {
@@ -158,7 +158,7 @@ class AssemblyProgram {
private:
using ScopedInstruction =
- scoped_ptr<Instruction, UncheckedDeleter<Instruction>>;
+ std::unique_ptr<Instruction, UncheckedDeleter<Instruction>>;
ExecutableType kind_;
@@ -177,7 +177,7 @@ class AssemblyProgram {
// Sharing instructions that emit a single byte saves a lot of space.
Instruction* GetByteInstruction(uint8_t byte);
- scoped_ptr<Instruction* [], base::FreeDeleter> byte_instruction_cache_;
+ std::unique_ptr<Instruction* [], base::FreeDeleter> byte_instruction_cache_;
uint64_t image_base_; // Desired or mandated base address of image.
@@ -196,7 +196,7 @@ class AssemblyProgram {
// Returns C_OK if succeeded, otherwise returns an error status and sets
// |*output| to null.
Status Encode(const AssemblyProgram& program,
- scoped_ptr<EncodedProgram>* output);
+ std::unique_ptr<EncodedProgram>* output);
} // namespace courgette
« no previous file with comments | « courgette/adjustment_method_unittest.cc ('k') | courgette/assembly_program.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698