diff options
Diffstat (limited to 'runtime/gc/accounting')
-rw-r--r-- | runtime/gc/accounting/heap_bitmap.h | 3 | ||||
-rw-r--r-- | runtime/gc/accounting/mod_union_table-inl.h | 6 | ||||
-rw-r--r-- | runtime/gc/accounting/mod_union_table.cc | 4 | ||||
-rw-r--r-- | runtime/gc/accounting/mod_union_table.h | 10 | ||||
-rw-r--r-- | runtime/gc/accounting/space_bitmap.h | 2 |
5 files changed, 10 insertions, 15 deletions
diff --git a/runtime/gc/accounting/heap_bitmap.h b/runtime/gc/accounting/heap_bitmap.h index a12809e..f4b725c 100644 --- a/runtime/gc/accounting/heap_bitmap.h +++ b/runtime/gc/accounting/heap_bitmap.h @@ -103,8 +103,7 @@ class HeapBitmap { void ReplaceObjectSet(SpaceSetMap* old_set, SpaceSetMap* new_set) EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_); - HeapBitmap(Heap* heap) : heap_(heap) { - } + explicit HeapBitmap(Heap* heap) : heap_(heap) {} private: diff --git a/runtime/gc/accounting/mod_union_table-inl.h b/runtime/gc/accounting/mod_union_table-inl.h index 32ac95f..9ea74d4 100644 --- a/runtime/gc/accounting/mod_union_table-inl.h +++ b/runtime/gc/accounting/mod_union_table-inl.h @@ -28,8 +28,7 @@ namespace accounting { // A mod-union table to record image references to the Zygote and alloc space. class ModUnionTableToZygoteAllocspace : public ModUnionTableReferenceCache { public: - ModUnionTableToZygoteAllocspace(Heap* heap) : ModUnionTableReferenceCache(heap) { - } + explicit ModUnionTableToZygoteAllocspace(Heap* heap) : ModUnionTableReferenceCache(heap) {} bool AddReference(const mirror::Object* /* obj */, const mirror::Object* ref) { const std::vector<space::ContinuousSpace*>& spaces = GetHeap()->GetContinuousSpaces(); @@ -48,8 +47,7 @@ public: // A mod-union table to record Zygote references to the alloc space. class ModUnionTableToAllocspace : public ModUnionTableReferenceCache { public: - ModUnionTableToAllocspace(Heap* heap) : ModUnionTableReferenceCache(heap) { - } + explicit ModUnionTableToAllocspace(Heap* heap) : ModUnionTableReferenceCache(heap) {} bool AddReference(const mirror::Object* /* obj */, const mirror::Object* ref) { const std::vector<space::ContinuousSpace*>& spaces = GetHeap()->GetContinuousSpaces(); diff --git a/runtime/gc/accounting/mod_union_table.cc b/runtime/gc/accounting/mod_union_table.cc index 05b68c4..aa02f82 100644 --- a/runtime/gc/accounting/mod_union_table.cc +++ b/runtime/gc/accounting/mod_union_table.cc @@ -117,8 +117,8 @@ class ModUnionClearCardVisitor { class ModUnionScanImageRootVisitor { public: - ModUnionScanImageRootVisitor(collector::MarkSweep* const mark_sweep) : mark_sweep_(mark_sweep) { - } + explicit ModUnionScanImageRootVisitor(collector::MarkSweep* const mark_sweep) + : mark_sweep_(mark_sweep) {} void operator ()(const Object* root) const EXCLUSIVE_LOCKS_REQUIRED(Locks::heap_bitmap_lock_) diff --git a/runtime/gc/accounting/mod_union_table.h b/runtime/gc/accounting/mod_union_table.h index 5435625..d46281c 100644 --- a/runtime/gc/accounting/mod_union_table.h +++ b/runtime/gc/accounting/mod_union_table.h @@ -49,11 +49,9 @@ class HeapBitmap; // cleared between GC phases, reducing the number of dirty cards that need to be scanned. class ModUnionTable { public: - ModUnionTable(Heap* heap) : heap_(heap) { - } + explicit ModUnionTable(Heap* heap) : heap_(heap) {} - virtual ~ModUnionTable() { - } + virtual ~ModUnionTable() {} // Clear cards which map to a memory range of a space. This doesn't immediately update the // mod-union table, as updating the mod-union table may have an associated cost, such as @@ -86,7 +84,7 @@ class ModUnionTable { // Reference caching implementation. Caches references pointing to alloc space(s) for each card. class ModUnionTableReferenceCache : public ModUnionTable { public: - ModUnionTableReferenceCache(Heap* heap) : ModUnionTable(heap) {} + explicit ModUnionTableReferenceCache(Heap* heap) : ModUnionTable(heap) {} virtual ~ModUnionTableReferenceCache() {} // Clear and store cards for a space. @@ -122,7 +120,7 @@ class ModUnionTableReferenceCache : public ModUnionTable { // Card caching implementation. Keeps track of which cards we cleared and only this information. class ModUnionTableCardCache : public ModUnionTable { public: - ModUnionTableCardCache(Heap* heap) : ModUnionTable(heap) {} + explicit ModUnionTableCardCache(Heap* heap) : ModUnionTable(heap) {} virtual ~ModUnionTableCardCache() {} // Clear and store cards for a space. diff --git a/runtime/gc/accounting/space_bitmap.h b/runtime/gc/accounting/space_bitmap.h index 32ab440..5a1bfe3 100644 --- a/runtime/gc/accounting/space_bitmap.h +++ b/runtime/gc/accounting/space_bitmap.h @@ -244,7 +244,7 @@ class SpaceSetMap { } } - SpaceSetMap(const std::string& name) : name_(name) {} + explicit SpaceSetMap(const std::string& name) : name_(name) {} ~SpaceSetMap() {} Objects& GetObjects() { |