Skip to content

Commit

Permalink
East const, add newline to end of file
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachaj committed Oct 29, 2024
1 parent 6a71ee1 commit 978e8f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions cppwinrt/code_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,8 @@ namespace cppwinrt
// immediately while preserving the error code and local variables.
format = R"( template <typename D%> auto consume_%<D%>::%(%) const noexcept
{%
const auto& castedResult = static_cast<% const&>(static_cast<D const&>(*this));
const auto abiType = *(abi_t<%>**)&castedResult;
auto const& castedResult = static_cast<% const&>(static_cast<D const&>(*this));
auto const abiType = *(abi_t<%>**)&castedResult;
check_cast_result(abiType);
abiType->%(%);%
}
Expand All @@ -1146,8 +1146,8 @@ namespace cppwinrt
{
format = R"( template <typename D%> auto consume_%<D%>::%(%) const noexcept
{%
const auto& castedResult = static_cast<% const&>(static_cast<D const&>(*this));
const auto abiType = *(abi_t<%>**)&castedResult;
auto const& castedResult = static_cast<% const&>(static_cast<D const&>(*this));
auto const abiType = *(abi_t<%>**)&castedResult;
check_cast_result(abiType);
WINRT_VERIFY_(0, abiType->%(%));%
}
Expand All @@ -1158,8 +1158,8 @@ namespace cppwinrt
{
format = R"( template <typename D%> auto consume_%<D%>::%(%) const
{%
const auto& castedResult = static_cast<% const&>(static_cast<D const&>(*this));
const auto abiType = *(abi_t<%>**)&castedResult;
auto const& castedResult = static_cast<% const&>(static_cast<D const&>(*this));
auto const abiType = *(abi_t<%>**)&castedResult;
check_cast_result(abiType);
check_hresult(abiType->%(%));%
}
Expand Down
2 changes: 1 addition & 1 deletion test/test/missing_required_interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ TEST_CASE("missing_required_interfaces")
// The IStringable::ToString method does not exist on this type. In previous versions of cppwinrt
// this line would crash with a nullptr deference. It now throws an exception.
REQUIRE_THROWS_AS(lies.ToString(), winrt::hresult_error);
}
}

0 comments on commit 978e8f5

Please sign in to comment.