[PATCH] uxtheme: fixed the todo blocks in the SetWindowTheme tests. [try 2]

James Hawkins truiken at gmail.com
Tue Oct 28 11:22:02 CDT 2008


On Tue, Oct 28, 2008 at 10:17 AM, Rob Shearman <robertshearman at gmail.com> wrote:
> 2008/10/28 James Hawkins <truiken at gmail.com>:
>> +    HRESULT hr = S_OK;
>>     TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName),
>>           debugstr_w(pszSubIdList));
>> -    hr = UXTHEME_SetWindowProperty(hwnd, atSubAppName, pszSubAppName);
>> +    if(!IsWindow(hwnd))
>> +        hr = E_HANDLE;
>> +    if(SUCCEEDED(hr))
>> +        hr = UXTHEME_SetWindowProperty(hwnd, atSubAppName, pszSubAppName);
>>     if(SUCCEEDED(hr))
>>         hr = UXTHEME_SetWindowProperty(hwnd, atSubIdList, pszSubIdList);
>>     if(SUCCEEDED(hr))
>>
>> This code is screaming for a goto.
>
> I disagree.
>

Yes, it was late and my mind stopped after the next thought.  There's
nothing to clean up, so simply returning the failed result is optimal.

-- 
James Hawkins



More information about the wine-devel mailing list