Skip to content

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

Merged
Adrian Tsai (adtsai) merged 1 commit into
microsoft:masterfrom
mingmingtasd:fix_issue
May 4, 2022
Merged

Adrian Tsai (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! Adrian Tsai (@adtsai)

@mingmingtasd

Copy link
Copy Markdown
Contributor Author

A soft ping~thanks! Adrian Tsai (@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! Adrian Tsai (@adtsai)

@adtsai

Copy link
Copy Markdown
Contributor

Thanks!

@adtsai
Adrian Tsai (adtsai) merged commit d16b197 into microsoft:master May 4, 2022
@Elijah-777 DaiJ (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