summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2016-11-03 20:54:56 +0000
committer android-build-merger <android-build-merger@google.com> 2016-11-03 20:54:56 +0000
commit2c8fa0d1c7f71fa1436068eb672b90245b2ca73f (patch)
tree816a2c5964a9488bf386953770b9e4139b2d6433
parent2f67c46d0421a10647a396bbecd5aabb5cff3f5f (diff)
parent113c45c280591bd512101629b3dd98a60f424977 (diff)
ART: Add "explicit" to constructors am: ea47ff8d26
am: 113c45c280 Change-Id: Ifc96bb79c6cecdeb0f8ec5645970b8123260761a
-rw-r--r--runtime/handle_scope.h2
-rw-r--r--runtime/thread.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/runtime/handle_scope.h b/runtime/handle_scope.h
index 8a0aba6121..adb7d8a10c 100644
--- a/runtime/handle_scope.h
+++ b/runtime/handle_scope.h
@@ -69,7 +69,7 @@ class PACKED(4) BaseHandleScope {
number_of_references_(num_references) {}
// Variable sized constructor.
- BaseHandleScope(BaseHandleScope* link)
+ explicit BaseHandleScope(BaseHandleScope* link)
: link_(link),
number_of_references_(kNumReferencesVariableSized) {}
diff --git a/runtime/thread.h b/runtime/thread.h
index 75b5b123da..4f26803726 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1567,7 +1567,8 @@ class Thread {
class SCOPED_CAPABILITY ScopedAssertNoThreadSuspension {
public:
- ALWAYS_INLINE ScopedAssertNoThreadSuspension(const char* cause) ACQUIRE(Roles::uninterruptible_) {
+ ALWAYS_INLINE explicit ScopedAssertNoThreadSuspension(const char* cause)
+ ACQUIRE(Roles::uninterruptible_) {
if (kIsDebugBuild) {
self_ = Thread::Current();
old_cause_ = self_->StartAssertNoThreadSuspension(cause);