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

Unified Diff: courgette/image_utils.h

Issue 1935203002: [Courgette] Using LabelManager to reduce Courgette-apply peak RAM by 25%. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 7 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/encoded_program_unittest.cc ('k') | courgette/label_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/image_utils.h
diff --git a/courgette/image_utils.h b/courgette/image_utils.h
index 643b9fb23873c99715fe57d8a630214718c8cbe8..19a04d52e1f7167a239cdcc3cac168b0a6f7177b 100644
--- a/courgette/image_utils.h
+++ b/courgette/image_utils.h
@@ -101,6 +101,8 @@ class Label {
// to the matching RVA target on demand without extra storage.
class RvaVisitor {
public:
+ virtual ~RvaVisitor() { }
+
// Returns the number of remaining RVAs to visit.
virtual size_t Remaining() const = 0;
@@ -118,7 +120,8 @@ class VectorRvaVisitor : public RvaVisitor {
public:
// Assumes |v| does not change for the lifetime of this instance.
explicit VectorRvaVisitor(const std::vector<T>& v)
- : it_(v.begin()), end_(v.end()) {}
+ : it_(v.begin()), end_(v.end()) { }
+ ~VectorRvaVisitor() override { }
// RvaVisitor interfaces.
size_t Remaining() const override { return std::distance(it_, end_); }
@@ -134,7 +137,8 @@ class VectorRvaVisitor : public RvaVisitor {
class TrivialRvaVisitor : public VectorRvaVisitor<RVA> {
public:
explicit TrivialRvaVisitor(const std::vector<RVA>& rvas)
- : VectorRvaVisitor<RVA>(rvas) {}
+ : VectorRvaVisitor<RVA>(rvas) { }
+ ~TrivialRvaVisitor() override { }
// VectorRvaVisitor<RVA> interfaces.
RVA Get() const override { return *it_; }
« no previous file with comments | « courgette/encoded_program_unittest.cc ('k') | courgette/label_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698