Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 deletions cppwinrt/component_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ bool __stdcall %_can_unload_now() noexcept
return true;
}

void* __stdcall %_get_activation_factory([[maybe_unused]] std::wstring_view const& name)
void* __stdcall %_get_activation_factory([[maybe_unused]] winrt::hstring const& name)
{
auto requal = [](std::wstring_view const& left, std::wstring_view const& right) noexcept
auto requal = [](winrt::hstring const& left, winrt::hstring const& right) noexcept
{
return std::equal(left.rbegin(), left.rend(), right.rbegin(), right.rend());
};
Expand Down Expand Up @@ -189,7 +189,7 @@ int32_t __stdcall WINRT_CanUnloadNow() noexcept

int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noexcept try
{
std::wstring_view const name{ *reinterpret_cast<winrt::hstring*>(&classId) };
winrt::hstring& const name{ *reinterpret_cast<winrt::hstring*>(&classId) };
*factory = %_get_activation_factory(name);

if (*factory)
Expand Down
5 changes: 0 additions & 5 deletions strings/base_string_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ WINRT_EXPORT namespace winrt::param
{
}

hstring(std::wstring_view const& value) noexcept
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is too much of a breaking source change to take at this point. I'd suggest adding it to the list of v3 features under consideration on #1123

{
create_string_reference(value.data(), value.size());
}

hstring(std::wstring const& value) noexcept
{
create_string_reference(value.data(), value.size());
Expand Down