diff options
author | 2016-09-01 15:08:13 -0700 | |
---|---|---|
committer | 2016-09-15 09:09:35 -0700 | |
commit | a5931185c97c7b17981a9fc5016834a0bdd9480b (patch) | |
tree | 22f1a57647d7113c7c5aa5e0f0db5937380f2739 /runtime/mirror/object_reference.h | |
parent | fce42f486d9a607fb4fb472ec142a82ceccb6b5f (diff) |
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
Diffstat (limited to 'runtime/mirror/object_reference.h')
-rw-r--r-- | runtime/mirror/object_reference.h | 6 |
1 files changed, 3 insertions, 3 deletions
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<kPoisonReferences, MirrorType>(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<kPoisonHeapReferences, Mirr return HeapReference<MirrorType>(mirror_ptr); } private: - HeapReference<MirrorType>(MirrorType* mirror_ptr) REQUIRES_SHARED(Locks::mutator_lock_) + explicit HeapReference(MirrorType* mirror_ptr) REQUIRES_SHARED(Locks::mutator_lock_) : ObjectReference<kPoisonHeapReferences, MirrorType>(mirror_ptr) {} }; @@ -104,7 +104,7 @@ class MANAGED CompressedReference : public mirror::ObjectReference<false, Mirror } private: - CompressedReference<MirrorType>(MirrorType* p) REQUIRES_SHARED(Locks::mutator_lock_) + explicit CompressedReference(MirrorType* p) REQUIRES_SHARED(Locks::mutator_lock_) : mirror::ObjectReference<false, MirrorType>(p) {} }; |