diff --git a/.pipelines/OneBranch.Official.yml b/.pipelines/OneBranch.Official.yml index d13b24622..cc45f6dbb 100644 --- a/.pipelines/OneBranch.Official.yml +++ b/.pipelines/OneBranch.Official.yml @@ -29,14 +29,14 @@ extends: platform: name: 'windows_undocked' product: 'build_tools' - + featureFlags: WindowsHostVersion: Version: 2022 cloudvault: enabled: false - + globalSdl: isNativeCode: true asyncSdl: diff --git a/.pipelines/OneBranch.PullRequest.yml b/.pipelines/OneBranch.PullRequest.yml index 9e18821b4..aa9562e21 100644 --- a/.pipelines/OneBranch.PullRequest.yml +++ b/.pipelines/OneBranch.PullRequest.yml @@ -30,11 +30,11 @@ extends: platform: name: 'windows_undocked' product: 'build_tools' - + featureFlags: WindowsHostVersion: Version: 2022 - + globalSdl: isNativeCode: true tsa: diff --git a/.pipelines/jobs/OneBranchBuild.yml b/.pipelines/jobs/OneBranchBuild.yml index fc355832b..a72a4f350 100644 --- a/.pipelines/jobs/OneBranchBuild.yml +++ b/.pipelines/jobs/OneBranchBuild.yml @@ -34,7 +34,7 @@ jobs: ob_sdl_prefast_enabled: true ob_sdl_prefast_runDuring: "Guardian" ob_sdl_checkCompliantCompilerWarnings: true - + ob_symbolsPublishing_enabled: ${{ parameters.OfficialBuild }} ob_symbolsPublishing_symbolsFolder: '$(ob_outputDirectory)' ob_symbolsPublishing_searchPattern: '**\*.pdb' diff --git a/.pipelines/jobs/OneBranchNuGet.yml b/.pipelines/jobs/OneBranchNuGet.yml index 371c222af..65ad24cfc 100644 --- a/.pipelines/jobs/OneBranchNuGet.yml +++ b/.pipelines/jobs/OneBranchNuGet.yml @@ -12,7 +12,7 @@ jobs: - job: pool: type: windows - + variables: ob_outputDirectory: '$(Build.SourcesDirectory)\out' PackageVersion: ${{ parameters.NugetPackageVersion }} diff --git a/.pipelines/jobs/OneBranchVsix.yml b/.pipelines/jobs/OneBranchVsix.yml index 0b1e307c8..eb4fd6c8c 100644 --- a/.pipelines/jobs/OneBranchVsix.yml +++ b/.pipelines/jobs/OneBranchVsix.yml @@ -42,7 +42,7 @@ jobs: ob_sdl_prefast_enabled: true ob_sdl_prefast_runDuring: 'Build' ob_sdl_checkCompliantCompilerWarnings: true - + steps: - task: UseDotNet@2 continueOnError: true @@ -82,7 +82,7 @@ jobs: inputs: artifactName: 'drop_build_arm64' targetPath: '$(Build.SourcesDirectory)\arm64' - + - task: DownloadPipelineArtifact@2 displayName: 'Download NuGet' inputs: @@ -112,7 +112,7 @@ jobs: signing_profile: external_distribution files_to_sign: '**\*.dll' search_root: '$(Agent.TempDirectory)\$(VsixFilename)' - + - task: ArchiveFiles@2 displayName: 'Repack signed VSIX contents' inputs: @@ -146,4 +146,4 @@ jobs: $(VsixFilename).pdb $(VsixFilename).json TargetFolder: '$(ob_outputDirectory)' - + diff --git a/.pipelines/variables/version.yml b/.pipelines/variables/version.yml index 15382e7df..66547c6f6 100644 --- a/.pipelines/variables/version.yml +++ b/.pipelines/variables/version.yml @@ -2,7 +2,7 @@ parameters: - name: OfficialBuild type: boolean default: false - + variables: MajorVersion: "2" MinorVersion: "0" diff --git a/about_module.md b/about_module.md index c337ace54..4af2c2705 100644 --- a/about_module.md +++ b/about_module.md @@ -39,9 +39,8 @@ First, write all header files in the following pattern: #pragma once #ifndef WINRT_XXX_H #define WINRT_XXX_H -#pragma push_macro("WINRT_EXPORT") #undef WINRT_EXPORT -#if !defined(WINRT_MODULE) // legacy header path +#ifndef WINRT_MODULE // legacy header path #define WINRT_EXPORT #include #include @@ -49,7 +48,6 @@ First, write all header files in the following pattern: #define WINRT_EXPORT export #endif // declarations/definitions -#pragma pop_macro("WINRT_EXPORT") #endif ``` diff --git a/build_nuget.cmd b/build_nuget.cmd index 87c65331f..c1df3dce5 100644 --- a/build_nuget.cmd +++ b/build_nuget.cmd @@ -1,10 +1,11 @@ rem @echo off -nuget >nul 2>&1 -if %errorlevel% neq 0 ( - echo NuGet is not available. Please install NuGet CLI from https://www.nuget.org/downloads and add it to PATH. - exit /b 1 -) +if not exist ".\.nuget" mkdir ".\.nuget" +if not exist ".\.nuget\nuget.exe" powershell -Command "$ProgressPreference = 'SilentlyContinue' ; Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .\.nuget\nuget.exe" + +call .nuget\nuget.exe restore cppwinrt.slnx +call .nuget\nuget.exe restore natvis\cppwinrtvisualizer.slnx +call .nuget\nuget.exe restore test\nuget\NugetTest.slnx set target_version=%1 if "%target_version%"=="" set target_version=3.0.0.0 @@ -19,4 +20,4 @@ call msbuild /m /p:Configuration=Release,Platform=x64,CppWinRTBuildVersion=%targ call msbuild /m /p:Configuration=Release,Platform=arm64,CppWinRTBuildVersion=%target_version% cppwinrt.slnx /t:cppwinrt rem Build nuget -nuget pack nuget\YexuanXiao.CppWinRTPlus.nuspec -Properties target_version=%target_version%;cppwinrt_exe_x86=%cd%\_build\x86\Release\cppwinrt.exe;cppwinrt_exe_amd64=%cd%\_build\x64\Release\cppwinrt.exe;cppwinrt_exe_arm64=%cd%\_build\arm64\Release\cppwinrt.exe;cppwinrt_fast_fwd_x86=%cd%\_build\x86\Release\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=%cd%\_build\x64\Release\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=%cd%\_build\arm64\Release\cppwinrt_fast_forwarder.lib +.nuget\nuget pack nuget\YexuanXiao.CppWinRTPlus.nuspec -Properties target_version=%target_version%;cppwinrt_exe_x86=%cd%\_build\x86\Release\cppwinrt.exe;cppwinrt_exe_amd64=%cd%\_build\x64\Release\cppwinrt.exe;cppwinrt_exe_arm64=%cd%\_build\arm64\Release\cppwinrt.exe;cppwinrt_fast_fwd_x86=%cd%\_build\x86\Release\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_x64=%cd%\_build\x64\Release\cppwinrt_fast_forwarder.lib;cppwinrt_fast_fwd_arm64=%cd%\_build\arm64\Release\cppwinrt_fast_forwarder.lib diff --git a/cppwinrt.slnx b/cppwinrt.slnx index e6655a88e..8756acad3 100644 --- a/cppwinrt.slnx +++ b/cppwinrt.slnx @@ -95,4 +95,4 @@ - + \ No newline at end of file diff --git a/cppwinrt/cmd_reader.h b/cppwinrt/cmd_reader.h index 4a9006227..b3840d766 100644 --- a/cppwinrt/cmd_reader.h +++ b/cppwinrt/cmd_reader.h @@ -98,9 +98,9 @@ namespace cppwinrt } std::filesystem::path normalized = std::filesystem::absolute(path).lexically_normal(); - + std::wstring const& sv = normalized.native(); - + if (sv.starts_with(LR"(\\?\)") || sv.starts_with(LR"(\\.\)")) { return normalized; } diff --git a/cppwinrt/code_writers.h b/cppwinrt/code_writers.h index 65cc48b9c..17f64604f 100644 --- a/cppwinrt/code_writers.h +++ b/cppwinrt/code_writers.h @@ -129,20 +129,20 @@ namespace cppwinrt static void write_module_aware_export_includes_start(writer& w) { w.write(R"( -#if !defined(WINRT_MODULE) +#ifndef WINRT_MODULE )"); } static void write_module_aware_export_includes_end(writer& w) { - w.write(R"( -#endif + w.write(R"(#endif + )"); } - [[nodiscard]] static finish_with wrap_module_aware_includes_guard(writer& w, bool enable_module) + [[nodiscard]] static finish_with wrap_module_aware_includes_guard(writer& w, bool enable) { - if (enable_module) + if (enable) { write_module_aware_export_includes_start(w); return { w, write_module_aware_export_includes_end }; diff --git a/cppwinrt/file_writers.h b/cppwinrt/file_writers.h index 9e687128c..095a2b4ab 100644 --- a/cppwinrt/file_writers.h +++ b/cppwinrt/file_writers.h @@ -192,20 +192,14 @@ namespace cppwinrt write_preamble(w); write_open_file_guard(w, ns, '0'); - if (settings.modules) { - write_module_aware_export_includes_start(w); - } + auto wrap_includes_guard = wrap_module_aware_includes_guard(w, !w.depends.empty() && settings.modules); - for (auto&& depends : w.depends) - { - auto wrap_type = wrap_type_namespace(w, depends.first); - w.write_each(depends.second); - } - - if (settings.modules) - { - write_module_aware_export_includes_end(w); + for (auto&& depends : w.depends) + { + auto wrap_type = wrap_type_namespace(w, depends.first); + w.write_each(depends.second); + } } w.save_header('0'); @@ -238,21 +232,15 @@ namespace cppwinrt write_preamble(w); write_open_file_guard(w, ns, '1'); - if (settings.modules) { - write_module_aware_export_includes_start(w); - } + auto wrap_includes_guard = wrap_module_aware_includes_guard(w, settings.modules); - for (auto&& depends : w.depends) - { - w.write_depends(depends.first, '0'); - } - - w.write_depends(w.type_namespace, '0'); + for (auto&& depends : w.depends) + { + w.write_depends(depends.first, '0'); + } - if (settings.modules) - { - write_module_aware_export_includes_end(w); + w.write_depends(w.type_namespace, '0'); } w.save_header('1'); @@ -290,21 +278,15 @@ namespace cppwinrt char const impl = promote ? '2' : '1'; - if (settings.modules) { - write_module_aware_export_includes_start(w); - } + auto wrap_includes_guard = wrap_module_aware_includes_guard(w, settings.modules); - for (auto&& depends : w.depends) - { - w.write_depends(depends.first, impl); - } - - w.write_depends(w.type_namespace, '1'); + for (auto&& depends : w.depends) + { + w.write_depends(depends.first, impl); + } - if (settings.modules) - { - write_module_aware_export_includes_end(w); + w.write_depends(w.type_namespace, '1'); } w.save_header('2'); @@ -318,9 +300,7 @@ namespace cppwinrt // Provide minimal textual includes required for macros / intrinsics / feature-test macros. // In Debug builds, include to provide _ASSERTE for WINRT_ASSERT. // Provide winrt/module.h to define the WINRT_IMPL_* macros (macros are not shared via import). - w.write(R"( -module; - + w.write(R"(module; #define WINRT_MODULE #include #include @@ -329,7 +309,6 @@ module; #include #endif #include "winrt/module.h" - )"); } @@ -391,7 +370,7 @@ export module winrt.numerics; #include #define _WINDOWS_NUMERICS_NAMESPACE_ winrt::Windows::Foundation::Numerics -#define _WINDOWS_NUMERICS_BEGIN_NAMESPACE_ export namespace winrt::Windows::Foundation::Numerics +#define _WINDOWS_NUMERICS_BEGIN_NAMESPACE_ export extern "C++" namespace winrt::Windows::Foundation::Numerics #define _WINDOWS_NUMERICS_END_NAMESPACE_ #include #undef _WINDOWS_NUMERICS_NAMESPACE_ @@ -551,12 +530,6 @@ export import winrt.base; w.write('\n'); - w.write(R"(#pragma push_macro("WINRT_EXPORT") -#undef WINRT_EXPORT -#define WINRT_EXPORT export - -)"); - // Export forward declarations for all projected types in this SCC. This provides names early enough for any // SCC-internal cycles that show up in the impl headers. for (auto&& ns : namespaces) @@ -578,10 +551,6 @@ export import winrt.base; w.write_each(members.contracts); } - w.write(R"(#pragma pop_macro("WINRT_EXPORT") - -)"); - // Pull in the per-namespace impl headers in a stable phase order so that all forward declarations are present // before definitions, regardless of SCC member ordering. for (auto&& ns : namespaces) @@ -661,24 +630,18 @@ export import winrt.base; write_preamble(w); write_open_file_guard(w, ns); - if (settings.modules) { - write_module_aware_export_includes_start(w); - } - - write_version_assert(w); - write_parent_depends(w, c, ns); + auto wrap_includes_guard = wrap_module_aware_includes_guard(w, settings.modules); - for (auto&& depends : w.depends) - { - w.write_depends(depends.first, '2'); - } + write_version_assert(w); + write_parent_depends(w, c, ns); - w.write_depends(w.type_namespace, '2'); + for (auto&& depends : w.depends) + { + w.write_depends(depends.first, '2'); + } - if (settings.modules) - { - write_module_aware_export_includes_end(w); + w.write_depends(w.type_namespace, '2'); } w.save_header(); diff --git a/fast_fwd/arm64/thunks.asm b/fast_fwd/arm64/thunks.asm index 0fe5252a0..dfabb57e0 100644 --- a/fast_fwd/arm64/thunks.asm +++ b/fast_fwd/arm64/thunks.asm @@ -26,7 +26,7 @@ ; Get method address from owner abi vtable ldr x0, [x1] ldr x15, [x0, x12, lsl #3] - + ; Verify indirect call target adrp x12, __guard_check_icall_fptr ldr x12, [x12, __guard_check_icall_fptr] diff --git a/fast_fwd/win32/thunks.asm b/fast_fwd/win32/thunks.asm index 84d352853..81662a2a0 100644 --- a/fast_fwd/win32/thunks.asm +++ b/fast_fwd/win32/thunks.asm @@ -13,7 +13,7 @@ InvokeForwarder PROC mov ecx, dword ptr[esp + 4] mov edx, dword ptr[ecx + 4] mov [esp + 4], edx - + ; Add offset and index add eax, dword ptr [ecx + 8] diff --git a/natvis/cppwinrt_visualizer.cpp b/natvis/cppwinrt_visualizer.cpp index 4b0a0c370..949cb6118 100644 --- a/natvis/cppwinrt_visualizer.cpp +++ b/natvis/cppwinrt_visualizer.cpp @@ -227,7 +227,7 @@ TypeSig ResolveGenericTypePart(DkmProcess* process, iter& it, sent const& end) { return TypeSig{ FindGuidType() }; } - + TypeDef type = FindSimpleType(process, partName); auto tickPos = partName.rfind('`'); if (tickPos == partName.npos) diff --git a/natvis/object_visualizer.cpp b/natvis/object_visualizer.cpp index 15e5851fa..44cd9bc01 100644 --- a/natvis/object_visualizer.cpp +++ b/natvis/object_visualizer.cpp @@ -816,7 +816,7 @@ HRESULT object_visualizer::CreateEvaluationResult(_Deref_out_ DkmEvaluationResul auto valueHome = make_com_ptr(m_pVisualizedExpression->ValueHome()); com_ptr pPointerValueHome = valueHome.as(); auto address = pPointerValueHome->Address(); - + com_ptr pValue; DkmEvaluationResultFlags_t evalResultFlags = DkmEvaluationResultFlags::ReadOnly | DkmEvaluationResultFlags::Expandable; if (requires_refresh(address, m_pVisualizedExpression->InspectionContext()->EvaluationFlags())) diff --git a/natvis/property_visualizer.cpp b/natvis/property_visualizer.cpp index 716ad3613..f0e0ab6c1 100644 --- a/natvis/property_visualizer.cpp +++ b/natvis/property_visualizer.cpp @@ -20,7 +20,7 @@ HRESULT property_visualizer::GetChildren( // Need to create a DkmArray of DkmChildVisualizedExpression that contain the evaluation results and return that. DkmAllocArray(initialChildren.Length, pVisualizedInitialChildren); - + for (DWORD i = 0; i < initialChildren.Length; i++) { auto pCurrEvaluationResult = make_com_ptr(initialChildren.Members[i]); @@ -67,7 +67,7 @@ HRESULT property_visualizer::GetItems( IF_FAIL_RET(m_pVisualizedExpression->GetItemsCallback(pEnumContext, StartIndex, Count, &evaluationResults)); DkmAllocArray(evaluationResults.Length, pItems); - + for (DWORD i = 0; i < evaluationResults.Length; i++) { auto pCurrEvaluationResult = make_com_ptr(evaluationResults.Members[i]); diff --git a/nuget/CppWinrtRules.Project.xml b/nuget/CppWinrtRules.Project.xml index 90a37963a..6b63ba843 100644 --- a/nuget/CppWinrtRules.Project.xml +++ b/nuget/CppWinrtRules.Project.xml @@ -67,7 +67,7 @@ DisplayName="Optimized" Description="Enables component projection optimization features (e.g., unified construction)" Category="General" /> - + & m_pcanceller; + ~unique_cancellation_lock() { m_pcanceller.store(nullptr, std::memory_order_release); @@ -164,7 +165,7 @@ WINRT_EXPORT namespace winrt void cancel() { auto canceller = m_canceller.exchange(cancelling_ptr, std::memory_order_acquire); - impl::unique_cancellation_lock lock{m_canceller}; + impl::unique_cancellation_lock lock{ m_canceller }; if ((canceller != nullptr) && (canceller != cancelling_ptr)) { diff --git a/strings/base_foundation.h b/strings/base_foundation.h index 23375858e..52a02ecd7 100644 --- a/strings/base_foundation.h +++ b/strings/base_foundation.h @@ -91,7 +91,7 @@ WINRT_EXPORT namespace winrt::impl { using type = struct_category; }; - + template <> struct category { using type = struct_category; diff --git a/strings/base_macros.h b/strings/base_macros.h index 702ab96ab..06b1c4d45 100644 --- a/strings/base_macros.h +++ b/strings/base_macros.h @@ -21,13 +21,19 @@ // Note: this is a workaround for a false-positive warning produced by the Visual C++ 16.3 compiler. #pragma warning(disable : 4268) + +// C++ module warnings by /W4 +#pragma warning(disable : 4499) +#pragma warning(disable : 4630) #endif +#ifndef WINRT_EXPORT #ifdef WINRT_MODULE -#define WINRT_EXPORT export +#define WINRT_EXPORT export extern "C++" #else #define WINRT_EXPORT #endif +#endif // pulls in large, hard-to-control legacy headers. In header builds we keep the // existing behavior, but in module builds it's provided by the winrt.numerics module. diff --git a/strings/base_std_hash.h b/strings/base_std_hash.h index cdffb13c6..42ff52e59 100644 --- a/strings/base_std_hash.h +++ b/strings/base_std_hash.h @@ -45,7 +45,7 @@ namespace std template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; - + template<> struct hash { std::size_t operator()(winrt::guid const& value) const noexcept diff --git a/test/nuget/TestStaticLibrary7/readme.txt b/test/nuget/TestStaticLibrary7/readme.txt index 061d7a558..818bc79f6 100644 --- a/test/nuget/TestStaticLibrary7/readme.txt +++ b/test/nuget/TestStaticLibrary7/readme.txt @@ -23,7 +23,7 @@ void* __stdcall winrt_get_activation_factory( { return factory; } - + /* call other activation factories */ return nullptr; diff --git a/test/old_tests/Component/Component_h.h b/test/old_tests/Component/Component_h.h index d31c6b468..9e395e4e7 100644 --- a/test/old_tests/Component/Component_h.h +++ b/test/old_tests/Component/Component_h.h @@ -3076,7 +3076,7 @@ HRESULT ( STDMETHODCALLTYPE *SetInt32 )( /* [size_is(count), out] */IInspectable * * value ); END_INTERFACE - + } __x_ABI_CComponent_CIParametersVtbl; interface __x_ABI_CComponent_CIParameters @@ -3329,7 +3329,7 @@ HRESULT ( STDMETHODCALLTYPE *Set )( /* [size_is(count), out] */__x_ABI_CComponent_CWrapStructure * value ); END_INTERFACE - + } __x_ABI_CComponent_CIStructuresVtbl; interface __x_ABI_CComponent_CIStructures @@ -3433,7 +3433,7 @@ HRESULT ( STDMETHODCALLTYPE *Invoke )( /* [in] */int value ); END_INTERFACE - + } __x_ABI_CComponent_CICustomDelegateVtbl; interface __x_ABI_CComponent_CICustomDelegate @@ -3489,7 +3489,7 @@ HRESULT ( STDMETHODCALLTYPE *Invoke )( /* [retval, out] */HSTRING * value ); END_INTERFACE - + } __x_ABI_CComponent_CIReturnDelegateVtbl; interface __x_ABI_CComponent_CIReturnDelegate @@ -3546,7 +3546,7 @@ HRESULT ( STDMETHODCALLTYPE *Invoke )( /* [in] */int args ); END_INTERFACE - + } __x_ABI_CComponent_CITwoArgDelegateVtbl; interface __x_ABI_CComponent_CITwoArgDelegate @@ -3604,7 +3604,7 @@ HRESULT ( STDMETHODCALLTYPE *Invoke )( /* [retval, out] */BOOL * result ); END_INTERFACE - + } __x_ABI_CComponent_CITwoArgDelegateReturnVtbl; interface __x_ABI_CComponent_CITwoArgDelegateReturn @@ -3692,7 +3692,7 @@ HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( /* [in] */int value ); END_INTERFACE - + } __x_ABI_CComponent_CIEventsStaticsVtbl; interface __x_ABI_CComponent_CIEventsStatics @@ -3821,7 +3821,7 @@ HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( /* [in] */int value ); END_INTERFACE - + } __x_ABI_CComponent_CIEventsVtbl; interface __x_ABI_CComponent_CIEvents @@ -3958,7 +3958,7 @@ HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( /* [in] */int value ); END_INTERFACE - + } __x_ABI_CComponent_CIStaticVtbl; interface __x_ABI_CComponent_CIStatic @@ -4096,7 +4096,7 @@ HRESULT ( STDMETHODCALLTYPE *Fail )( __x_ABI_CComponent_CIErrors * This ); END_INTERFACE - + } __x_ABI_CComponent_CIErrorsVtbl; interface __x_ABI_CComponent_CIErrors @@ -4280,7 +4280,7 @@ HRESULT ( STDMETHODCALLTYPE *String )( __x_ABI_CComponent_CIFastInput * This ); END_INTERFACE - + } __x_ABI_CComponent_CIFastInputVtbl; interface __x_ABI_CComponent_CIFastInput @@ -4432,7 +4432,7 @@ HRESULT ( STDMETHODCALLTYPE *Create )( /* [retval, out] */__x_ABI_CWindows_CFoundation_CIClosable * * _out ); END_INTERFACE - + } __x_ABI_CComponent_CIFastInputVectorFactoryVtbl; interface __x_ABI_CComponent_CIFastInputVectorFactory @@ -4541,7 +4541,7 @@ HRESULT ( STDMETHODCALLTYPE *Create )( /* [retval, out] */__x_ABI_CWindows_CFoundation_CIClosable * * _out ); END_INTERFACE - + } __x_ABI_CComponent_CIFastInputMapFactoryVtbl; interface __x_ABI_CComponent_CIFastInputMapFactory @@ -4678,7 +4678,7 @@ HRESULT ( STDMETHODCALLTYPE *CustomVirtualMethod )( /* [retval, out] */HSTRING * value ); END_INTERFACE - + } __x_ABI_CComponent_CICustomBaseVtbl; interface __x_ABI_CComponent_CICustomBase diff --git a/test/old_tests/Composable/Composable.idl b/test/old_tests/Composable/Composable.idl index 7f298e195..1be35156d 100644 --- a/test/old_tests/Composable/Composable.idl +++ b/test/old_tests/Composable/Composable.idl @@ -45,7 +45,7 @@ namespace Composable { HRESULT ProtectedMethod([out, retval] int* value); }; - + [version(1.0), uuid(5f3996e1-3cf7-4716-9a3d-11eb5d32caff), exclusiveto(Derived)] interface IDerived : IInspectable { diff --git a/test/old_tests/Composable/Composable_h.h b/test/old_tests/Composable/Composable_h.h index d4de510d7..72cbdd540 100644 --- a/test/old_tests/Composable/Composable_h.h +++ b/test/old_tests/Composable/Composable_h.h @@ -573,7 +573,7 @@ HRESULT ( STDMETHODCALLTYPE *VirtualMethod )( /* [retval, out] */HSTRING * value ); END_INTERFACE - + } __x_ABI_CComposable_CIBaseVtbl; interface __x_ABI_CComposable_CIBase @@ -679,7 +679,7 @@ HRESULT ( STDMETHODCALLTYPE *CreateInstance )( /* [retval, out] */__x_ABI_CComposable_CIBase * * instance ); END_INTERFACE - + } __x_ABI_CComposable_CIBaseFactoryVtbl; interface __x_ABI_CComposable_CIBaseFactory @@ -774,7 +774,7 @@ HRESULT ( STDMETHODCALLTYPE *OverridableMethod )( /* [retval, out] */HSTRING * value ); END_INTERFACE - + } __x_ABI_CComposable_CIBaseOverridesVtbl; interface __x_ABI_CComposable_CIBaseOverrides @@ -861,7 +861,7 @@ HRESULT ( STDMETHODCALLTYPE *GetTrustLevel )( /* [OUT ] */ __RPC__out TrustLevel *trustLevel ); END_INTERFACE - + } __x_ABI_CComposable_CIDerivedVtbl; interface __x_ABI_CComposable_CIDerived @@ -955,7 +955,7 @@ HRESULT ( STDMETHODCALLTYPE *CreateInstance )( /* [retval, out] */__x_ABI_CComposable_CIDerived * * instance ); END_INTERFACE - + } __x_ABI_CComposable_CIDerivedFactoryVtbl; interface __x_ABI_CComposable_CIDerivedFactory @@ -1125,7 +1125,7 @@ HRESULT ( STDMETHODCALLTYPE *Test1 )( /* [retval, out] */DOUBLE * result ); END_INTERFACE - + } __x_ABI_CComposable_CITestStructCodeGenVtbl; interface __x_ABI_CComposable_CITestStructCodeGen diff --git a/test/old_tests/UnitTests/FastStrings.cpp b/test/old_tests/UnitTests/FastStrings.cpp index 9d2cceebe..fa2785044 100644 --- a/test/old_tests/UnitTests/FastStrings.cpp +++ b/test/old_tests/UnitTests/FastStrings.cpp @@ -33,7 +33,7 @@ TEST_CASE("FastStrings") v.TryLookup(L"hello"sv); v.HasKey(L"hello"sv); } - + { std::uint32_t index = 0; single_threaded_vector().GetView().IndexOf(0, index); diff --git a/test/old_tests/UnitTests/TryLookup.cpp b/test/old_tests/UnitTests/TryLookup.cpp index 8210cff0d..ee96381e2 100644 --- a/test/old_tests/UnitTests/TryLookup.cpp +++ b/test/old_tests/UnitTests/TryLookup.cpp @@ -122,7 +122,7 @@ TEST_CASE("TryLookup TryRemove error") void Remove(int) { throw_hresult(code); } void Clear() { throw_hresult(E_UNEXPECTED); } // shouldn't be called by the test }; - + auto self = make_self(); IMap map = *self; @@ -178,7 +178,7 @@ TEST_CASE("trylookup_from_abi specialization") REQUIRE(!map.TryLookup(123)); // make sure regular lookup stll throws bounds REQUIRE_THROWS_AS(map.Lookup(123), hresult_out_of_bounds); - + // Simulate a non-agile map that is being accessed from the wrong thread. // "Try" operations should throw rather than erroneously report "not found". // Because they didn't even try. The operation never got off the ground. @@ -252,7 +252,7 @@ TEST_CASE("trylookup_from_abi specialization with IInspectable") self->returnNullptr = true; REQUIRE(map.TryLookup(123) == IInspectable{nullptr}); REQUIRE(map.Lookup(123) == IInspectable{nullptr}); - + // Make sure that we use the TryLookup specialization, and don't throw an unexpected exception. self->shouldThrowOnTryLookup = false; self->returnNullptr = false; diff --git a/test/old_tests/UnitTests/as_implements.cpp b/test/old_tests/UnitTests/as_implements.cpp index 60b27342f..74549a2cb 100644 --- a/test/old_tests/UnitTests/as_implements.cpp +++ b/test/old_tests/UnitTests/as_implements.cpp @@ -110,7 +110,7 @@ TEST_CASE("as_implements_inheritance") com_ptr bar2 = stringable.as(); REQUIRE(bar.get() == bar2.get()); } - + com_ptr foo = bar.as(); REQUIRE(bar.get() == foo.get()); { diff --git a/test/old_tests/UnitTests/com_ptr.cpp b/test/old_tests/UnitTests/com_ptr.cpp index 569877112..329c25bf1 100644 --- a/test/old_tests/UnitTests/com_ptr.cpp +++ b/test/old_tests/UnitTests/com_ptr.cpp @@ -300,7 +300,7 @@ TEST_CASE("com_ptr, convertible copy ctor assign") { com_ptr<::IInspectable> a = test_make_inspectable(); REQUIRE(a); - + com_ptr<::IUnknown> b = a; // convertible copy ctor REQUIRE(b); diff --git a/test/old_tests/UnitTests/implements_nested.cpp b/test/old_tests/UnitTests/implements_nested.cpp index c6110e895..ec4e0ba7f 100644 --- a/test/old_tests/UnitTests/implements_nested.cpp +++ b/test/old_tests/UnitTests/implements_nested.cpp @@ -17,7 +17,7 @@ struct nested_derived : implements>::value == 3); static_assert(impl::is_implements()); - + static_assert(std::is_same::type, Bar>::value); static_assert(std::is_same::type, impl::root_implements>::value); static_assert(std::is_same::type, Bar>::value); diff --git a/test/old_tests/UnitTests/to_hstring.cpp b/test/old_tests/UnitTests/to_hstring.cpp index 4037ebda4..521cc35f6 100644 --- a/test/old_tests/UnitTests/to_hstring.cpp +++ b/test/old_tests/UnitTests/to_hstring.cpp @@ -107,7 +107,7 @@ TEST_CASE("to_hstring") setlocale(LC_ALL, "C"); } } guard; - + test_cases(); // Set a locale with funky decimal and digit separators diff --git a/vsix/Extension.targets b/vsix/Extension.targets index 442f03a53..1caaf2e6d 100644 --- a/vsix/Extension.targets +++ b/vsix/Extension.targets @@ -30,11 +30,11 @@ - + - + true diff --git a/vsix/ProjectTemplates/VC/Windows Universal/StaticLibrary/readme.txt b/vsix/ProjectTemplates/VC/Windows Universal/StaticLibrary/readme.txt index 64228f81d..be2e63e08 100644 --- a/vsix/ProjectTemplates/VC/Windows Universal/StaticLibrary/readme.txt +++ b/vsix/ProjectTemplates/VC/Windows Universal/StaticLibrary/readme.txt @@ -23,7 +23,7 @@ void* __stdcall winrt_get_activation_factory( { return factory; } - + /* call other activation factories */ return nullptr; diff --git a/vsix/Resources/VSPackage.resx b/vsix/Resources/VSPackage.resx index 731c40309..91fc2719f 100644 --- a/vsix/Resources/VSPackage.resx +++ b/vsix/Resources/VSPackage.resx @@ -13,16 +13,16 @@