From 93ba893c20532990a430741e0a97212900094e8c Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Wed, 17 Jul 2013 21:31:49 -0700 Subject: Fix cpplint runtime/explicit issues Change-Id: I352ba0b427f1ff9b22887693952b180eae0839ba --- compiler/dex/arena_allocator.h | 4 ++-- compiler/dex/arena_bit_vector.h | 2 +- compiler/dex/backend.h | 2 +- compiler/dex/growable_array.h | 2 +- compiler/dex/local_value_numbering.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'compiler/dex') diff --git a/compiler/dex/arena_allocator.h b/compiler/dex/arena_allocator.h index cc81e50..0ad859e 100644 --- a/compiler/dex/arena_allocator.h +++ b/compiler/dex/arena_allocator.h @@ -47,7 +47,7 @@ class ArenaAllocator { kNumAllocKinds }; - ArenaAllocator(size_t default_size = ARENA_DEFAULT_BLOCK_SIZE); + explicit ArenaAllocator(size_t default_size = ARENA_DEFAULT_BLOCK_SIZE); ~ArenaAllocator(); void* NewMem(size_t size, bool zero, ArenaAllocKind kind); size_t BytesAllocated() { @@ -86,7 +86,7 @@ struct MemStats { void Dump(std::ostream& os) const { arena_.DumpMemStats(os); } - MemStats(const ArenaAllocator &arena) : arena_(arena) {}; + explicit MemStats(const ArenaAllocator &arena) : arena_(arena) {}; private: const ArenaAllocator &arena_; }; // MemStats diff --git a/compiler/dex/arena_bit_vector.h b/compiler/dex/arena_bit_vector.h index 0b7bbc5..7e5c436 100644 --- a/compiler/dex/arena_bit_vector.h +++ b/compiler/dex/arena_bit_vector.h @@ -33,7 +33,7 @@ class ArenaBitVector { class Iterator { public: - Iterator(ArenaBitVector* bit_vector) + explicit Iterator(ArenaBitVector* bit_vector) : p_bits_(bit_vector), bit_storage_(bit_vector->GetRawStorage()), bit_index_(0), diff --git a/compiler/dex/backend.h b/compiler/dex/backend.h index 6f5ba38..7fa8e99 100644 --- a/compiler/dex/backend.h +++ b/compiler/dex/backend.h @@ -30,7 +30,7 @@ class Backend { virtual CompiledMethod* GetCompiledMethod() = 0; protected: - Backend(ArenaAllocator* arena) : arena_(arena) {}; + explicit Backend(ArenaAllocator* arena) : arena_(arena) {}; ArenaAllocator* const arena_; }; // Class Backend diff --git a/compiler/dex/growable_array.h b/compiler/dex/growable_array.h index 6ab0f16..6d26bc2 100644 --- a/compiler/dex/growable_array.h +++ b/compiler/dex/growable_array.h @@ -49,7 +49,7 @@ class GrowableArray { class Iterator { public: - Iterator(GrowableArray* g_list) + explicit Iterator(GrowableArray* g_list) : idx_(0), g_list_(g_list) {}; diff --git a/compiler/dex/local_value_numbering.h b/compiler/dex/local_value_numbering.h index f2b2291..09ed7ae 100644 --- a/compiler/dex/local_value_numbering.h +++ b/compiler/dex/local_value_numbering.h @@ -33,7 +33,7 @@ typedef SafeMap MemoryVersionMap; class LocalValueNumbering { public: - LocalValueNumbering(CompilationUnit* cu) : cu_(cu) {}; + explicit LocalValueNumbering(CompilationUnit* cu) : cu_(cu) {}; static uint64_t BuildKey(uint16_t op, uint16_t operand1, uint16_t operand2, uint16_t modifier) { return (static_cast(op) << 48 | static_cast(operand1) << 32 | -- cgit v1.1