From 58523110d37c8cb2fda823df356e1a784431279e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 15 May 2020 05:52:31 +0200 Subject: [PATCH] src: remove unnecessary else in base_object-inl.h This commit removes two unnecessary else statements in base_object-inl.h. It also tries to make the if statements consistent with regards to braces. --- src/base_object-inl.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/base_object-inl.h b/src/base_object-inl.h index 60ccf81cc559c5..f6e980e8749f61 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -217,20 +217,22 @@ BaseObject::PointerData* BaseObjectPtrImpl::pointer_data() const { if (kIsWeak) { return data_.pointer_data; - } else { - if (get_base_object() == nullptr) return nullptr; - return get_base_object()->pointer_data(); } + if (get_base_object() == nullptr) { + return nullptr; + } + return get_base_object()->pointer_data(); } template BaseObject* BaseObjectPtrImpl::get_base_object() const { if (kIsWeak) { - if (pointer_data() == nullptr) return nullptr; + if (pointer_data() == nullptr) { + return nullptr; + } return pointer_data()->self; - } else { - return data_.target; } + return data_.target; } template