Skip to content

Commit 9f45405

Browse files
committed
Small fixes for VS 2026
1 parent 0f4229d commit 9f45405

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

src/AppInstallerCLITests/Yaml.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ TEST_CASE("YamlMergeSequenceNode_CaseInsensitive", "[YAML]")
9797
auto luffy = std::find_if(
9898
document["StrawHats"].Sequence().begin(),
9999
document["StrawHats"].Sequence().end(),
100-
[](auto const& n) { return n["Name"].as<std::string>() == "Monkey D Luffy"; });
100+
[](Node const& n) { return n["Name"].as<std::string>() == "Monkey D Luffy"; });
101101
REQUIRE(luffy != document["StrawHats"].Sequence().end());
102102

103103
// From original node

src/Microsoft.Management.Configuration/ExceptionResultHelpers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#pragma once
44
#include <exception>
55
#include <AppInstallerLogging.h>
6+
#include <AppInstallerStrings.h>
67

78
namespace winrt::Microsoft::Management::Configuration::implementation
89
{

src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
121121
<ClCompile>
122122
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
123-
<ProgramDataBaseFileName>$(OutDir)$(TargetName)Debug.pdb</ProgramDataBaseFileName>
124123
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">false</RuntimeTypeInfo>
125124
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</RuntimeTypeInfo>
126125
<RuntimeTypeInfo Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</RuntimeTypeInfo>
@@ -325,4 +324,3 @@
325324
<Error Condition="!Exists('$(SolutionDir)\packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
326325
</Target>
327326
</Project>
328-

src/Microsoft.Management.Configuration/ShutdownSynchronization.h

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,34 @@ namespace winrt::Microsoft::Management::Configuration::implementation
5555
std::unique_ptr<AppInstaller::WinRT::AsyncCancellation> m_cancellation;
5656
};
5757

58+
struct ShutdownSynchronization
59+
{
60+
using CancellableWeakPtr = std::weak_ptr<AppInstaller::WinRT::details::AsyncCancellationTypeErasure>;
61+
62+
ShutdownSynchronization() = default;
63+
64+
static ShutdownSynchronization& Instance();
65+
66+
// Signals that new work should be blocked.
67+
void BlockNewWork();
68+
69+
// Call to register the begin and end of work.
70+
void RegisterWorkBegin(CancellableWeakPtr&& ptr);
71+
void RegisterWorkEnd(CancellableWeakPtr&& ptr);
72+
73+
// Cancels all currently registered work.
74+
void CancelAllWork();
75+
76+
// Waits for outstanding work to be completed.
77+
void Wait();
78+
79+
private:
80+
std::atomic_bool m_disabled{ false };
81+
std::mutex m_workLock;
82+
std::set<CancellableWeakPtr, std::owner_less<CancellableWeakPtr>> m_work;
83+
wil::slim_event_manual_reset m_noActiveWork{ true };
84+
};
85+
5886
// An AsyncProgress that registers with ShutdownSynchronization.
5987
template <typename ResultT, typename ProgressT>
6088
struct ShutdownAwareAsyncProgress
@@ -142,32 +170,4 @@ namespace winrt::Microsoft::Management::Configuration::implementation
142170
std::unique_ptr<ShutdownAwareAsyncCancellationPromise> m_defaultPromise;
143171
std::unique_ptr<AppInstaller::WinRT::AsyncProgress<ResultT, ProgressT>> m_progress;
144172
};
145-
146-
struct ShutdownSynchronization
147-
{
148-
using CancellableWeakPtr = std::weak_ptr<AppInstaller::WinRT::details::AsyncCancellationTypeErasure>;
149-
150-
ShutdownSynchronization() = default;
151-
152-
static ShutdownSynchronization& Instance();
153-
154-
// Signals that new work should be blocked.
155-
void BlockNewWork();
156-
157-
// Call to register the begin and end of work.
158-
void RegisterWorkBegin(CancellableWeakPtr&& ptr);
159-
void RegisterWorkEnd(CancellableWeakPtr&& ptr);
160-
161-
// Cancels all currently registered work.
162-
void CancelAllWork();
163-
164-
// Waits for outstanding work to be completed.
165-
void Wait();
166-
167-
private:
168-
std::atomic_bool m_disabled{ false };
169-
std::mutex m_workLock;
170-
std::set<CancellableWeakPtr, std::owner_less<CancellableWeakPtr>> m_work;
171-
wil::slim_event_manual_reset m_noActiveWork{ true };
172-
};
173173
}

src/Microsoft.Management.Configuration/pch.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
#include <winrt/Windows.Storage.Streams.h>
1111

1212
#pragma warning( push )
13-
#pragma warning ( disable : 4467 6388)
13+
#pragma warning ( disable : 4324 4467 6388 )
14+
// 4324 Structure was padded due to alignment specifier
1415
// 4467 Allow use of uuid attribute for com object creation.
1516
// 6388 Allow CreateInstance.
1617
#include <wil/cppwinrt_wrl.h>

0 commit comments

Comments
 (0)