11 Aug
2010
11 Aug
'10
4:56 p.m.
On Wednesday, August 11, 2010 3:12:23 am David Adam wrote:
Hello,
some comments about this patch + if (hr != S_OK) return FALSE; + else return TRUE;
could be simplified as return SUCCEEDED(hr);
SUCCEEDED encompasses more than just S_OK (S_FALSE, for instance; basically anything that doesn't have the high bit set). Whether to test SUCCEEDED or S_OK explicitly depends on what the function can return and what it means. The original behavior could instead be simplified as: return hr==S_OK;