Skip to content

Commit 944694c

Browse files
HariniMalothu17iamAbhi-916Harini Malothu
authored
[0.81]Visual studio 2026 strict check fix (#15602)
* visual studio 2026 strict check fix * Change files --------- Co-authored-by: Abhijeet Jha <74712637+iamAbhi-916@users.noreply.github.com> Co-authored-by: Harini Malothu <hmalothu@microsoft.com>
1 parent 0caaf1c commit 944694c

5 files changed

Lines changed: 22 additions & 7 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "none",
3+
"comment": "visual studio 2026 strict check fix",
4+
"packageName": "react-native-windows",
5+
"email": "hmalothu@microsoft.com",
6+
"dependentChangeType": "none"
7+
}

vnext/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ HRESULT UiaNavigateHelper(
4848
uint32_t index = children.Size() - 1;
4949
do {
5050
auto child = children.GetAt(index).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
51-
if (uiaProvider = child->EnsureUiaProvider()) {
51+
uiaProvider = child->EnsureUiaProvider();
52+
if (uiaProvider) {
5253
break;
5354
}
5455
} while (index-- != 0);
@@ -60,7 +61,8 @@ HRESULT UiaNavigateHelper(
6061
uint32_t index = 0;
6162
do {
6263
auto child = children.GetAt(index).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
63-
if (uiaProvider = child->EnsureUiaProvider()) {
64+
uiaProvider = child->EnsureUiaProvider();
65+
if (uiaProvider) {
6466
break;
6567
}
6668
} while (++index != children.Size());
@@ -74,7 +76,8 @@ HRESULT UiaNavigateHelper(
7476

7577
while (++it != children.end()) {
7678
auto nextchild = (*it).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
77-
if (uiaProvider = nextchild->EnsureUiaProvider()) {
79+
uiaProvider = nextchild->EnsureUiaProvider();
80+
if (uiaProvider) {
7881
break;
7982
}
8083
}
@@ -91,7 +94,8 @@ HRESULT UiaNavigateHelper(
9194
do {
9295
it--;
9396
auto prevchild = (*it).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
94-
if (uiaProvider = prevchild->EnsureUiaProvider()) {
97+
uiaProvider = prevchild->EnsureUiaProvider();
98+
if (uiaProvider) {
9599
break;
96100
}
97101
} while (it != children.begin());

vnext/Mso/src/dispatchQueue/queueService.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ void QueueService::InvokeTask(
205205
DispatchTask taskToInvoke{std::move(task)};
206206
taskToInvoke.Get()->Invoke(); // Call Get()->Invoke instead of operator() to flatten call stack
207207

208-
while (taskToInvoke = context.TakeNextDeferredTask()) {
208+
taskToInvoke = context.TakeNextDeferredTask();
209+
while (taskToInvoke) {
209210
taskToInvoke.Get()->Invoke();
211+
taskToInvoke = context.TakeNextDeferredTask();
210212
}
211213
}
212214

vnext/Mso/src/dispatchQueue/uiScheduler_winrt.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ bool UISchedulerWinRT<TDispatcherTraits>::TryTakeTask(
271271
--m_taskCount;
272272
}
273273

274-
if (queue = m_queue.GetStrongPtr()) {
274+
queue = m_queue.GetStrongPtr();
275+
if (queue) {
275276
return queue->TryDequeTask(task);
276277
}
277278

vnext/Shared/Networking/OriginPolicyHttpFilter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,8 @@ ResponseOperation OriginPolicyHttpFilter::SendRequestAsync(HttpRequestMessage co
758758
if (originPolicy == OriginPolicy::CrossOriginResourceSharing) {
759759
// If inner filter can AllowRedirect, disable for preflight.
760760
winrt::impl::com_ref<IHttpBaseProtocolFilter> baseFilter;
761-
if (baseFilter = m_innerFilter.try_as<IHttpBaseProtocolFilter>()) {
761+
baseFilter = m_innerFilter.try_as<IHttpBaseProtocolFilter>();
762+
if (baseFilter) {
762763
baseFilter.AllowAutoRedirect(false);
763764
}
764765

0 commit comments

Comments
 (0)