win32/Com: use if with init-statement
This commit is contained in:
		 Shen-Ta Hsieh
					Shen-Ta Hsieh
				
			
				
					committed by
					
						 Max Kellermann
						Max Kellermann
					
				
			
			
				
	
			
			
			 Max Kellermann
						Max Kellermann
					
				
			
						parent
						
							ed1a995bff
						
					
				
				
					commit
					22b840c2f1
				
			| @@ -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"); | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user