Commit 22b840c2 authored by Shen-Ta Hsieh's avatar Shen-Ta Hsieh Committed by Max Kellermann

win32/Com: use if with init-statement

parent ed1a995b
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
class COM { class COM {
public: public:
COM() { COM() {
HRESULT result = CoInitializeEx(nullptr, COINIT_MULTITHREADED); if (HRESULT result = CoInitializeEx(nullptr, COINIT_MULTITHREADED);
if (FAILED(result)) { FAILED(result)) {
throw FormatHResultError(result, "Unable to initialize COM"); throw FormatHResultError(result, "Unable to initialize COM");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment