commit bb2804c0b611e30f3f48a6049e3aca6f133de7b7
parent 8a1844ab86dc65e028a63c01de8c2284cf4eb176
Author: Chris Peterson <cpeterson@mozilla.com>
Date: Tue, 9 Dec 2025 00:01:32 +0000
Bug 2002864 - Replace MOZ_CONSTINIT with C++20 constinit in Windows code. r=win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D274514
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hal/windows/WindowsSensor.cpp b/hal/windows/WindowsSensor.cpp
@@ -16,7 +16,7 @@ using namespace mozilla::hal;
namespace mozilla {
namespace hal_impl {
-MOZ_CONSTINIT static RefPtr<ISensor> sAccelerometer;
+constinit static RefPtr<ISensor> sAccelerometer;
class SensorEvent final : public ISensorEvents {
public:
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
@@ -253,7 +253,7 @@ static const wchar_t kUser32LibName[] = L"user32.dll";
uint32_t nsWindow::sInstanceCount = 0;
bool nsWindow::sIsOleInitialized = false;
-MOZ_CONSTINIT nsIWidget::Cursor nsWindow::sCurrentCursor = {};
+constinit nsIWidget::Cursor nsWindow::sCurrentCursor = {};
nsWindow* nsWindow::sCurrentWindow = nullptr;
bool nsWindow::sJustGotDeactivate = false;
bool nsWindow::sJustGotActivate = false;