[webkit-changes] [WebKit/WebKit] 643f0a: Align const member functions of CheckedRef/Checked...

Ryosuke Niwa noreply at github.com
Thu Aug 31 21:39:51 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 643f0a10c60b19057c260f790290b9d56ecb7de1
      https://github.com/WebKit/WebKit/commit/643f0a10c60b19057c260f790290b9d56ecb7de1
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M Source/WTF/wtf/CheckedPtr.h
    M Source/WTF/wtf/CheckedRef.h

  Log Message:
  -----------
  Align const member functions of CheckedRef/CheckedPtr with Ref/RefPtr
https://bugs.webkit.org/show_bug.cgi?id=261001

Reviewed by Chris Dumez.

Make const members of CheckedRef/CheckedPtr return mutable T&/T* instead of
const T/&T* to match the corresponding functions in Ref/RefPtr.

* Source/WTF/wtf/CheckedPtr.h:
(WTF::CheckedPtr::operator bool const):
(WTF::CheckedPtr::operator! const): Deleted.
(WTF::CheckedPtr::get const):
(WTF::CheckedPtr::get): Deleted.
(WTF::CheckedPtr::operator* const):
(WTF::CheckedPtr::operator*): Deleted.
(WTF::CheckedPtr::operator-> const):
(WTF::CheckedPtr::operator->): Deleted.
* Source/WTF/wtf/CheckedRef.h:
(WTF::CheckedRef::ptr const):
(WTF::CheckedRef::ptr): Deleted.
(WTF::CheckedRef::get const):
(WTF::CheckedRef::get): Deleted.
(WTF::CheckedRef::operator-> const):
(WTF::CheckedRef::operator->): Deleted.
(WTF::CheckedRef::operator T& const):
(WTF::CheckedRef::operator const T& const): Deleted.
(WTF::CheckedRef::operator bool const):
(WTF::CheckedRef::operator! const): Deleted.
(WTF::CheckedRef::operator T&): Deleted.

Canonical link: https://commits.webkit.org/267543@main




More information about the webkit-changes mailing list