Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 4, 2022

Conversation

mingmingtasd
Copy link
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
Contributor Author

A soft ping~thanks! @adtsai

@@ -16,7 +16,7 @@ using Microsoft::WRL::ComPtr;
HRESULT IsWarpAdapter(IDXGIAdapter1* pAdapter, bool* isWarpAdapter)
Copy link
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
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
Copy link
Contributor

adtsai commented May 4, 2022

Thanks!

@adtsai adtsai merged commit d16b197 into microsoft:master May 4, 2022
@DaiShaoJie77 DaiShaoJie77 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