Skip to content

Change ReturnIfFailed to ThrowIfFailed in Python\device.cpp#232

Merged
adtsai merged 1 commit into
microsoft:masterfrom
mingmingtasd:fix_issue
May 4, 2022
Merged

Change ReturnIfFailed to ThrowIfFailed in Python\device.cpp#232
adtsai merged 1 commit into
microsoft:masterfrom
mingmingtasd:fix_issue

Conversation

@mingmingtasd

Copy link
Copy Markdown
Contributor

I find that device.cpp uses ThrowIfFailed to handle errors, but I used ReturnIfFailed in my last PR. I am so sorry for that and now change it to align, please help to take a look! Thanks very much! @adtsai

@mingmingtasd

Copy link
Copy Markdown
Contributor Author

A soft ping~thanks! @adtsai

Comment thread Python/src/device.cpp Outdated
@@ -16,7 +16,7 @@ using Microsoft::WRL::ComPtr;
HRESULT IsWarpAdapter(IDXGIAdapter1* pAdapter, bool* isWarpAdapter)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since this no longer returns anything other than S_OK, can this function just return a bool directly? This will eliminate the need for the isWarpAdapter out param.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, thanks for your suggestions! I updated as that, PTAL again, thanks! @adtsai

@adtsai

adtsai commented May 4, 2022

Copy link
Copy Markdown
Contributor

Thanks!

@adtsai adtsai merged commit d16b197 into microsoft:master May 4, 2022
@Elijah-777 Elijah-777 mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants