[webkit-changes] [WebKit/WebKit] d21a68: Use std::unique_ptr instead of std::optional to re...
Alex Christensen
noreply at github.com
Wed Jan 22 17:51:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d21a68f2b3a798c6d70bc1dfabc2b54157b33dea
https://github.com/WebKit/WebKit/commit/d21a68f2b3a798c6d70bc1dfabc2b54157b33dea
Author: Alex Christensen <achristensen at apple.com>
Date: 2025-01-22 (Wed, 22 Jan 2025)
Changed paths:
M Source/WebCore/Modules/mediastream/UserMediaRequest.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/ViewportArguments.h
M Source/WebCore/page/LoginStatus.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/testing/Internals.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
Log Message:
-----------
Use std::unique_ptr instead of std::optional to remove unnecessary includes from Page.h
https://bugs.webkit.org/show_bug.cgi?id=286376
Reviewed by Ryosuke Niwa.
In order to have a std::optional<T> member variable, you have to include T.h
in order to know sizeof(T). Switching to std::unique_ptr, you don't have to
include T.h because you know the size of a pointer without seeing the definition
of T.
This should speed up complie time a little bit.
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::viewportArguments const):
* Source/WebCore/dom/ViewportArguments.h:
* Source/WebCore/page/LoginStatus.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setOverrideViewportArguments):
(WebCore::Page::setLastAuthentication):
* Source/WebCore/page/Page.h:
(WebCore::Page::overrideViewportArguments const):
(WebCore::Page::lastAuthentication const):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setLoginStatus):
Canonical link: https://commits.webkit.org/289268@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list