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
7 changes: 6 additions & 1 deletion cppwinrt/cmd_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ namespace cppwinrt
registry_key(registry_key const&) = delete;
registry_key& operator=(registry_key const&) = delete;

explicit registry_key(HKEY handle) :
handle(handle)
{
}

~registry_key() noexcept
{
if (handle)
Expand Down Expand Up @@ -138,7 +143,7 @@ namespace cppwinrt
throw std::invalid_argument("Could not find the Windows SDK in the registry");
}

return { key };
return registry_key{ key };
}

inline std::filesystem::path get_sdk_path()
Expand Down
1 change: 1 addition & 0 deletions strings/base_includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <charconv>
#include <chrono>
#include <cstddef>
#include <iterator>
#include <map>
#include <memory>
#include <optional>
Expand Down
4 changes: 2 additions & 2 deletions test/old_tests/UnitTests/StructCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ namespace
{
HRESULT __stdcall Test1(int a, ABI::Composable::TestStructCodeGen b, DOUBLE* result) override
{
*result = a + b.Value + b.GridUnitType;
*result = a + b.Value + static_cast<int>(b.GridUnitType);
return S_OK;
}

HRESULT __stdcall Test2(ABI::Composable::TestStructCodeGen b, int a, DOUBLE* result) override
{
*result = a + b.Value + b.GridUnitType;
*result = a + b.Value + static_cast<int>(b.GridUnitType);
return S_OK;
}
};
Expand Down
1 change: 0 additions & 1 deletion test/old_tests/UnitTests/to_hstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ namespace
{
hstring const a = L"This \u260E is a telephone!";
std::string const b = to_string(a);
REQUIRE(b == u8"This \u260E is a telephone!");
hstring const c = to_hstring(b);
REQUIRE(a == c);
}
Expand Down