Tools: Reformat to current clang-format standard
This commit is contained in:
committed by
Chris Hennes
parent
2e4ed1ae99
commit
c1825036a6
@@ -61,16 +61,18 @@ STDMETHODIMP_(ULONG) CClassFactory::AddRef()
|
||||
STDMETHODIMP_(ULONG) CClassFactory::Release()
|
||||
{
|
||||
LONG cRef = InterlockedDecrement(&m_cRef);
|
||||
if (0 == cRef)
|
||||
if (0 == cRef) {
|
||||
delete this;
|
||||
}
|
||||
return (ULONG)cRef;
|
||||
}
|
||||
|
||||
|
||||
STDMETHODIMP CClassFactory::CreateInstance(IUnknown* punkOuter, REFIID riid, void** ppvObject)
|
||||
{
|
||||
if (NULL != punkOuter)
|
||||
if (NULL != punkOuter) {
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
}
|
||||
|
||||
return CThumbnailProvider_CreateInstance(riid, ppvObject);
|
||||
}
|
||||
@@ -84,18 +86,21 @@ STDMETHODIMP CClassFactory::LockServer(BOOL fLock)
|
||||
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
|
||||
{
|
||||
if (NULL == ppv)
|
||||
if (NULL == ppv) {
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
if (!IsEqualCLSID(CLSID_SampleThumbnailProvider, rclsid))
|
||||
if (!IsEqualCLSID(CLSID_SampleThumbnailProvider, rclsid)) {
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
CClassFactory* pcf;
|
||||
HRESULT hr;
|
||||
|
||||
pcf = new CClassFactory();
|
||||
if (NULL == pcf)
|
||||
if (NULL == pcf) {
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
hr = pcf->QueryInterface(riid, ppv);
|
||||
pcf->Release();
|
||||
|
||||
Reference in New Issue
Block a user