Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cross-mingw-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is a cmake-toolchain(5) file that can be used to cross-build
# cppwinrt.exe fron Linux or other operating systems using a mingw-w64 cross
# cppwinrt.exe from Linux or other operating systems using a mingw-w64 cross
# toolchain. This should work with both GCC-based and llvm-mingw toolchains.
#
# Example usage with external toolchain:
Expand Down
2 changes: 1 addition & 1 deletion natvis/object_visualizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum class ObjectType
Projection,
};

// Metatdata for resolving a runtime class property value
// Metadata for resolving a runtime class property value
struct PropertyData
{
std::wstring iid;
Expand Down
2 changes: 1 addition & 1 deletion nuget/Microsoft.Windows.CppWinRT.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
<CppWinRTParameters Condition="'$(CppWinRTFastAbi)'=='true'">$(CppWinRTParameters) -fastabi</CppWinRTParameters>
<CppWinRTPath Condition="'$(CppWinRTPackage)' == 'true' and '$(CppWinRTPath)'==''">"$(CppWinRTPackageDir)bin\"</CppWinRTPath>
<CppWinRTPath Condition="'$(CppWinRTPackage)' != 'true' and '$(CppWinRTPath)'==''">"$(CppWinRTPackageDir)"</CppWinRTPath>
<!-- By default enable C++/WinRT to include target platform winmds if we didn't overide sdk references and the C++ Project system isn't already adding them -->
<!-- By default enable C++/WinRT to include target platform winmds if we didn't override sdk references and the C++ Project system isn't already adding them -->
<!-- _PrepareForReferenceResolution adds the references if TargetPlatformIdentifier is UAP -->
<CppWinRTImplicitlyExpandTargetPlatform Condition="'$(CppWinRTImplicitlyExpandTargetPlatform)' == '' and '$(CppWinRTOverrideSDKReferences)' != 'true' and '$(TargetPlatformIdentifier)' != 'UAP'">true</CppWinRTImplicitlyExpandTargetPlatform>
<XamlLanguage Condition="'$(CppWinRTProjectLanguage)' == 'C++/CX'">C++</XamlLanguage>
Expand Down
6 changes: 3 additions & 3 deletions nuget/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ It sets the following project properties and item metadata:
| Link.AdditionalDependencies | WindowsApp.lib | Umbrella library for Windows Runtime imports |
| Midl.AdditionalOptions | /reference ... | Enables faster compilation with winmd references (versus idl imports) |
| Midl.EnableWindowsRuntime | true | Enables Windows Runtime semantics |
| Midl.MetadataFileName | Unmerged\%(Filename).winmd | Generates unmerged metadata in a tempoary location |
| Midl.MetadataFileName | Unmerged\%(Filename).winmd | Generates unmerged metadata in a temporary location |
| Midl.GenerateClientFiles, GenerateServerFiles, GenerateStublessProxies, GenerateTypeLibrary, HeaderFileName, DllDataFileName, InterfaceIdentifierFileName, ProxyFileName, TypeLibraryName | *nul, *None, *false | Disable unnecessary output |
\*If not already set

Expand Down Expand Up @@ -114,7 +114,7 @@ void MyComponent::InitializeComponent()

***[Windows|Microsoft]::UI::Xaml::Markup::ComponentConnectorT***

A consequence of calling InitializeComponent outside construction is that Xaml runtime callbacks to IComponentConnector::Connect and IComponentConnector2::GetBindingConnector are now dispatched to the most derived implementations. Previously, these calls were dispatched directly to the class under construction, as the vtable had yet to be initialized. For objects with markup that derive from composable base classes with markup, this is a breaking change. Derived classes must now implement IComponentConnector::Connect and IComponentConnector2::GetBindingConnector by explicitly calling into the base class. The ComponentConnectorT template provides a correct implemenation for these interfaces:
A consequence of calling InitializeComponent outside construction is that Xaml runtime callbacks to IComponentConnector::Connect and IComponentConnector2::GetBindingConnector are now dispatched to the most derived implementations. Previously, these calls were dispatched directly to the class under construction, as the vtable had yet to be initialized. For objects with markup that derive from composable base classes with markup, this is a breaking change. Derived classes must now implement IComponentConnector::Connect and IComponentConnector2::GetBindingConnector by explicitly calling into the base class. The ComponentConnectorT template provides a correct implementation for these interfaces:

```cpp
struct DerivedPage : winrt::Windows::UI::Xaml::Markup::ComponentConnectorT<DerivedPageT<DerivedPage>>
Expand Down Expand Up @@ -147,7 +147,7 @@ For example, if the verbosity is set to minimal, then only messages with high im
The default importance of C++/WinRT build messages is 'normal', but this can be overridden with the CppWinRTVerbosity property to enable throttling of C++/WinRT messages independent of the overall verbosity level.

Example:
> msbuild project.vcxproj /vebosity:minimal /property:CppWinRTVerbosity=high ...
> msbuild project.vcxproj /verbosity:minimal /property:CppWinRTVerbosity=high ...

For more complex analysis of build errors, the [MSBuild Binary and Structured Log Viewer](http://msbuildlog.com/) is highly recommended.

Expand Down
4 changes: 2 additions & 2 deletions test/catch.hpp
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comes from somewhere as I'm pretty sure I've changed it elsewhere in the past. Happy to drop this or anything else.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can update catch.hpp to the latest version. https://github.com/catchorg/Catch2

Original file line number Diff line number Diff line change
Expand Up @@ -7779,7 +7779,7 @@ namespace Catch {
result = -erfc_inv(2.0 * p);
// result *= normal distribution standard deviation (1.0) * sqrt(2)
result *= /*sd * */ ROOT_TWO;
// result += normal disttribution mean (0)
// result += normal distribution mean (0)
return result;
}

Expand Down Expand Up @@ -11310,7 +11310,7 @@ namespace Catch {
std::string TagInfo::all() const {
size_t size = 0;
for (auto const& spelling : spellings) {
// Add 2 for the brackes
// Add 2 for the brackets
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things like this are frustrating -- it could be braces and it isn't terribly obvious, but I'm moderately confident because later in the file it does compose [ + ... + ].

size += spelling.size() + 2;
}

Expand Down
4 changes: 2 additions & 2 deletions test/old_tests/Component/Component.idl
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ namespace Component
runtimeclass FastInputVector
{
// Don't confuse this for a high-performance vector. This is for testing fast-input binding support.
// The default interface is intentionally not one of the collection intefaces to force them to be convertible for testing.
// The default interface is intentionally not one of the collection interfaces to force them to be convertible for testing.
[default] interface Windows.Foundation.IClosable;
interface Windows.Foundation.Collections.IVector<HSTRING>;
interface Windows.Foundation.Collections.IVectorView<HSTRING>;
Expand All @@ -265,7 +265,7 @@ namespace Component
runtimeclass FastInputMap
{
// Don't confuse this for a high-performance map. This is for testing fast-input binding support.
// The default interface is intentionally not one of the collection intefaces to force them to be convertible for testing.
// The default interface is intentionally not one of the collection interfaces to force them to be convertible for testing.
[default] interface Windows.Foundation.IClosable;
interface Windows.Foundation.Collections.IMap<HSTRING, HSTRING>;
interface Windows.Foundation.Collections.IMapView<HSTRING, HSTRING>;
Expand Down
12 changes: 6 additions & 6 deletions test/old_tests/UnitTests/abi_guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace Windows::Foundation;
namespace
{
//
// This implemenetation uses the simplest abi_enter and abi_exit methods.
// This implementation uses the simplest abi_enter and abi_exit methods.
//
struct A : implements<A, IClosable, IStringable>
{
Expand Down Expand Up @@ -60,7 +60,7 @@ namespace
}

//
// This implemenetation uses the abi_enter but omits the abi_exit method.
// This implementation uses the abi_enter but omits the abi_exit method.
//
struct B : implements<B, IClosable, IStringable>
{
Expand Down Expand Up @@ -102,7 +102,7 @@ namespace
}

//
// This implemenetation throws from the abi_enter method.
// This implementation throws from the abi_enter method.
//
struct C : implements<C, IClosable, IStringable>
{
Expand Down Expand Up @@ -145,7 +145,7 @@ namespace
}

//
// This implemenetation provides a nested abi_guard
// This implementation provides a nested abi_guard
//
struct D : implements<D, IClosable, IStringable>
{
Expand Down Expand Up @@ -223,7 +223,7 @@ namespace
};

//
// This implemenetation use an abi_guard type alias
// This implementation use an abi_guard type alias
//
struct E : implements<E, IClosable, IStringable>
{
Expand Down Expand Up @@ -275,7 +275,7 @@ namespace
};

//
// This implemenetation use an abi_guard type alias that thows
// This implementation use an abi_guard type alias that throws
//
struct F : implements<F, IClosable, IStringable>
{
Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ TEST_CASE("async, Cancel_IAsyncOperationWithProgress, 2")
}

//
// These tests confirm the implicit cancelation behavior. The obeservable behavior should be the same as above
// These tests confirm the implicit cancelation behavior. The observable behavior should be the same as above
// but the implementation relies on an exception so we confirm that the state changes occur as before.
//

Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ TEST_CASE("delegate,MapChangedEventHandler")
TEST_CASE("delegate,collection")
{
//
// Mostly a compiliation test to ensure that we can create collections of delegates. This is a rare corner case that was
// Mostly a compilation test to ensure that we can create collections of delegates. This is a rare corner case that was
// previously not working.
//

Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/make_self.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#endif

//
// These tests ensure that the make_self function works as expected to provide direct acccess
// These tests ensure that the make_self function works as expected to provide direct access
// to an implementation.
//
// The IMakeSelf IUnknown interface is also tested as this covers an edge case in the implements
Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/marshal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "catch.hpp"

// These tests do not attempt to test the FTM itself, but merely to confirm that the presence and
// absence of the non_agile marker does indeed produce the correct reponses from QueryInterface.
// absence of the non_agile marker does indeed produce the correct responses from QueryInterface.
// CoMarshalInterfaceXxxx is also used to exercise the code paths. Also, these tests confirm that
// the weak reference object inherits the same agility as the source. Although much of this is
// tested elsewhere, it was helpful to have these tests as a set.
Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/produce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// These tests cover the production of the three core interfaces namely IUnknown, IInspectable, and IActivationFactory.
// Tests ensure that the ABI surface lines up on the consumer and producer sides and this is mainly done simply by calling
// the various inteface methods.
// the various interface methods.
//

using namespace winrt;
Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/produce_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// These tests cover the production of the various async interfaces.
// Tests ensure that the ABI surface lines up on the consumer and producer sides and this is mainly done simply by calling
// the various inteface methods.
// the various interface methods.
//

using namespace winrt;
Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/produce_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// These tests cover the production of the various map-related interfaces.
// Tests ensure that the ABI surface lines up on the consumer and producer sides and this is mainly done simply by calling
// the various inteface methods.
// the various interface methods.
//

using namespace winrt;
Expand Down
2 changes: 1 addition & 1 deletion test/old_tests/UnitTests/produce_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// These tests cover the production of the various vector-related interfaces.
// Tests ensure that the ABI surface lines up on the consumer and producer sides and this is mainly done simply by calling
// the various inteface methods.
// the various interface methods.
//

using namespace winrt;
Expand Down
4 changes: 2 additions & 2 deletions test/old_tests/UnitTests/struct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using namespace Windows::Web::Http;
//
// This first test ensures that structures with HSTRING fields are projected correctly.
// In this case, a suitable interface is provided by the Windows SDK to simplify testing.
// IControlTemplate provides the necessary methods for excercising input and output
// IControlTemplate provides the necessary methods for exercising input and output
// patterns for code generation.
//

Expand Down Expand Up @@ -47,7 +47,7 @@ TEST_CASE("struct, TypeName")
//
// This second test ensures that structures with IReference<T> fields are projected correctly.
// In this case, a suitable interface is not available in the Windows SDK so we hand-roll the
// the necessary intput and output patterms for code generation. We also rely on a custom
// the necessary input and output patterns for code generation. We also rely on a custom
// implementation of IReference<T> so that we can additionally check that the object is
// destroyed correctly.
//
Expand Down
12 changes: 6 additions & 6 deletions test/test/abi_guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using namespace Windows::Foundation;
namespace
{
//
// This implemenetation uses the simplest abi_enter and abi_exit methods
// This implementation uses the simplest abi_enter and abi_exit methods
//
struct Simple : implements<Simple, IClosable, IStringable>
{
Expand Down Expand Up @@ -34,7 +34,7 @@ namespace
};

//
// This implemenetation uses the abi_enter but omits the abi_exit method
// This implementation uses the abi_enter but omits the abi_exit method
//
struct OnlyEnter : implements<OnlyEnter, IClosable, IStringable>
{
Expand All @@ -56,7 +56,7 @@ namespace
};

//
// This implemenetation throws from the abi_enter method
// This implementation throws from the abi_enter method
//
struct Throwing : implements<Throwing, IClosable, IStringable>
{
Expand All @@ -83,7 +83,7 @@ namespace
};

//
// This implemenetation provides a nested abi_guard
// This implementation provides a nested abi_guard
//
struct NestedGuard : implements<NestedGuard, IClosable, IStringable>
{
Expand Down Expand Up @@ -138,7 +138,7 @@ namespace
};

//
// This implemenetation use an abi_guard type alias
// This implementation use an abi_guard type alias
//
struct GuardAlias : implements<GuardAlias, IClosable, IStringable>
{
Expand Down Expand Up @@ -167,7 +167,7 @@ namespace
};

//
// This implemenetation use an abi_guard type alias that thows
// This implementation use an abi_guard type alias that throws
//
struct ThrowAlias : implements<ThrowAlias, IClosable, IStringable>
{
Expand Down
2 changes: 1 addition & 1 deletion test/test/cmd_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ TEST_CASE("cmd_reader")
REQUIRE_FALSE(args.exists("verbose"));
}

// response file #4: really really long path
// response file #4: really, really, long path
{
const char* argv[] = { "progname", "@respfile.txt" };
const size_t argc = _countof(argv);
Expand Down
2 changes: 1 addition & 1 deletion test/test/thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ TEST_CASE("thread_pool")
uint32_t const stable_counter = test(test_iterations, 1, 1);
uint32_t const unstable_counter = test(test_iterations, 10, 10);

// This is determinstic since the queue is single-threaded.
// This is deterministic since the queue is single-threaded.
REQUIRE(stable_counter == test_iterations);

// This is unlikely to fail since the pool is multi-threaded.
Expand Down
2 changes: 1 addition & 1 deletion test/test_component_base/pch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
#include "winrt/base.h"

// get_module_lock will always return true if WINRT_NO_MODULE_LOCK is defined.
// This ensures that if the DLL unecessarily exports DllCanUnloadNow that it
// This ensures that if the DLL unnecessarily exports DllCanUnloadNow that it
// will in turn return S_FALSE.
static_assert(winrt::get_module_lock());