Update include files for bracket style

This commit is contained in:
Marshall Greenblatt
2023-01-04 18:12:54 -05:00
parent 83cb82d50f
commit 9f8be5ea6c
15 changed files with 151 additions and 92 deletions

View File

@ -229,8 +229,9 @@ class TRIVIAL_ABI scoped_refptr {
// should move or copy construct from an existing scoped_refptr<T> to the
// ref-counted object.
scoped_refptr(T* p) : ptr_(p) {
if (ptr_)
if (ptr_) {
AddRef(ptr_);
}
}
// Copy constructor. This is required in addition to the copy conversion
@ -261,8 +262,9 @@ class TRIVIAL_ABI scoped_refptr {
"It's unsafe to override the ref count preference."
" Please remove REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE"
" from subclasses.");
if (ptr_)
if (ptr_) {
Release(ptr_);
}
}
T* get() const { return ptr_; }