diff --git a/src/AppInstallerCLITests/Yaml.cpp b/src/AppInstallerCLITests/Yaml.cpp index 949a17846c..d21d14e63d 100644 --- a/src/AppInstallerCLITests/Yaml.cpp +++ b/src/AppInstallerCLITests/Yaml.cpp @@ -97,7 +97,7 @@ TEST_CASE("YamlMergeSequenceNode_CaseInsensitive", "[YAML]") auto luffy = std::find_if( document["StrawHats"].Sequence().begin(), document["StrawHats"].Sequence().end(), - [](auto const& n) { return n["Name"].as() == "Monkey D Luffy"; }); + [](Node const& n) { return n["Name"].as() == "Monkey D Luffy"; }); REQUIRE(luffy != document["StrawHats"].Sequence().end()); // From original node diff --git a/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h b/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h index 51720f11b1..b3cf1dd398 100644 --- a/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h +++ b/src/Microsoft.Management.Configuration/ExceptionResultHelpers.h @@ -3,6 +3,7 @@ #pragma once #include #include +#include namespace winrt::Microsoft::Management::Configuration::implementation { diff --git a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj index b3ee49d30f..b881999f7f 100644 --- a/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj +++ b/src/Microsoft.Management.Configuration/Microsoft.Management.Configuration.vcxproj @@ -120,7 +120,6 @@ _DEBUG;%(PreprocessorDefinitions) - $(OutDir)$(TargetName)Debug.pdb false false false @@ -325,4 +324,3 @@ - diff --git a/src/Microsoft.Management.Configuration/ShutdownSynchronization.h b/src/Microsoft.Management.Configuration/ShutdownSynchronization.h index 5a397f81c2..c09c1c5d82 100644 --- a/src/Microsoft.Management.Configuration/ShutdownSynchronization.h +++ b/src/Microsoft.Management.Configuration/ShutdownSynchronization.h @@ -55,6 +55,34 @@ namespace winrt::Microsoft::Management::Configuration::implementation std::unique_ptr m_cancellation; }; + struct ShutdownSynchronization + { + using CancellableWeakPtr = std::weak_ptr; + + ShutdownSynchronization() = default; + + static ShutdownSynchronization& Instance(); + + // Signals that new work should be blocked. + void BlockNewWork(); + + // Call to register the begin and end of work. + void RegisterWorkBegin(CancellableWeakPtr&& ptr); + void RegisterWorkEnd(CancellableWeakPtr&& ptr); + + // Cancels all currently registered work. + void CancelAllWork(); + + // Waits for outstanding work to be completed. + void Wait(); + + private: + std::atomic_bool m_disabled{ false }; + std::mutex m_workLock; + std::set> m_work; + wil::slim_event_manual_reset m_noActiveWork{ true }; + }; + // An AsyncProgress that registers with ShutdownSynchronization. template struct ShutdownAwareAsyncProgress @@ -142,32 +170,4 @@ namespace winrt::Microsoft::Management::Configuration::implementation std::unique_ptr m_defaultPromise; std::unique_ptr> m_progress; }; - - struct ShutdownSynchronization - { - using CancellableWeakPtr = std::weak_ptr; - - ShutdownSynchronization() = default; - - static ShutdownSynchronization& Instance(); - - // Signals that new work should be blocked. - void BlockNewWork(); - - // Call to register the begin and end of work. - void RegisterWorkBegin(CancellableWeakPtr&& ptr); - void RegisterWorkEnd(CancellableWeakPtr&& ptr); - - // Cancels all currently registered work. - void CancelAllWork(); - - // Waits for outstanding work to be completed. - void Wait(); - - private: - std::atomic_bool m_disabled{ false }; - std::mutex m_workLock; - std::set> m_work; - wil::slim_event_manual_reset m_noActiveWork{ true }; - }; } diff --git a/src/Microsoft.Management.Configuration/pch.h b/src/Microsoft.Management.Configuration/pch.h index 9c59df4c7f..3b6c6a7c13 100644 --- a/src/Microsoft.Management.Configuration/pch.h +++ b/src/Microsoft.Management.Configuration/pch.h @@ -10,7 +10,8 @@ #include #pragma warning( push ) -#pragma warning ( disable : 4467 6388) +#pragma warning ( disable : 4324 4467 6388 ) +// 4324 Structure was padded due to alignment specifier // 4467 Allow use of uuid attribute for com object creation. // 6388 Allow CreateInstance. #include diff --git a/src/SfsClient/SfsClient.vcxproj b/src/SfsClient/SfsClient.vcxproj index 380e6eec28..9b50a5516e 100644 --- a/src/SfsClient/SfsClient.vcxproj +++ b/src/SfsClient/SfsClient.vcxproj @@ -51,7 +51,7 @@ StaticLibrary true - + StaticLibrary false Spectre