From a5931185c97c7b17981a9fc5016834a0bdd9480b Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 1 Sep 2016 15:08:13 -0700 Subject: Fix google-explicit-constructor warnings in art. * Add explicit keyword to conversion constructors, or NOLINT for implicit converters. Bug: 28341362 Test: build with WITH_TIDY=1 Change-Id: I1e1ee2661812944904fedadeff97b620506db47d --- runtime/mirror/object_reference.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/mirror/object_reference.h') diff --git a/runtime/mirror/object_reference.h b/runtime/mirror/object_reference.h index 583cfc3c75..f4a358018e 100644 --- a/runtime/mirror/object_reference.h +++ b/runtime/mirror/object_reference.h @@ -55,7 +55,7 @@ class MANAGED ObjectReference { } protected: - ObjectReference(MirrorType* mirror_ptr) + explicit ObjectReference(MirrorType* mirror_ptr) REQUIRES_SHARED(Locks::mutator_lock_) : reference_(Compress(mirror_ptr)) { } @@ -87,7 +87,7 @@ class MANAGED HeapReference : public ObjectReference(mirror_ptr); } private: - HeapReference(MirrorType* mirror_ptr) REQUIRES_SHARED(Locks::mutator_lock_) + explicit HeapReference(MirrorType* mirror_ptr) REQUIRES_SHARED(Locks::mutator_lock_) : ObjectReference(mirror_ptr) {} }; @@ -104,7 +104,7 @@ class MANAGED CompressedReference : public mirror::ObjectReference(MirrorType* p) REQUIRES_SHARED(Locks::mutator_lock_) + explicit CompressedReference(MirrorType* p) REQUIRES_SHARED(Locks::mutator_lock_) : mirror::ObjectReference(p) {} }; -- cgit v1.2.3-59-g8ed1b