Skip to content

Commit 05e7933

Browse files
committed
Use tabs instead of spaces in function implementations
1 parent 78bb116 commit 05e7933

3 files changed

Lines changed: 47 additions & 47 deletions

File tree

CResourceManagerFactory.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
ULONG CResourceManagerFactory::AddRef()
99
{
10-
return ++m_cRef;
10+
return ++m_cRef;
1111
}
1212

1313
ULONG CResourceManagerFactory::Release()
1414
{
15-
if(--m_cRef != 0)
16-
return m_cRef;
17-
delete this;
18-
return 0;
15+
if(--m_cRef != 0)
16+
return m_cRef;
17+
delete this;
18+
return 0;
1919
}
2020

2121
HRESULT CResourceManagerFactory::QueryInterface(REFIID riid, void** ppv)
@@ -36,28 +36,28 @@ HRESULT CResourceManagerFactory::QueryInterface(REFIID riid, void** ppv)
3636

3737

3838
HRESULT CResourceManagerFactory::CreateInstance(IUnknown *pUnknownOuter,
39-
REFIID riid, void** ppv)
39+
REFIID riid, void** ppv)
4040
{
41-
if(pUnknownOuter != NULL)
42-
return CLASS_E_NOAGGREGATION;
41+
if(pUnknownOuter != NULL)
42+
return CLASS_E_NOAGGREGATION;
4343

4444
// Initialize returned object pointer to NULL
4545
*ppv = NULL;
4646

47-
CResourceManager *pResManager = new CResourceManager(NULL);
48-
if(pResManager == NULL)
49-
return E_OUTOFMEMORY;
47+
CResourceManager *pResManager = new CResourceManager(NULL);
48+
if(pResManager == NULL)
49+
return E_OUTOFMEMORY;
5050

51-
HRESULT hr = pResManager->QueryInterface(riid, ppv);
52-
pResManager->Release();
53-
return hr;
51+
HRESULT hr = pResManager->QueryInterface(riid, ppv);
52+
pResManager->Release();
53+
return hr;
5454
}
5555

5656
HRESULT CResourceManagerFactory::LockServer(BOOL bLock)
5757
{
58-
if(bLock)
59-
g_cLocks++;
60-
else
61-
g_cLocks--;
62-
return S_OK;
58+
if(bLock)
59+
g_cLocks++;
60+
else
61+
g_cLocks--;
62+
return S_OK;
6363
}

GlobalFunctions.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77
void PostErrorMsg(WCHAR *errorMsg)
88
{
99
// Provide rich error information
10-
// Create generic error object.
11-
ICreateErrorInfo* pCreateErrorInfo;
12-
if (FAILED(CreateErrorInfo(&pCreateErrorInfo)))
10+
// Create generic error object.
11+
ICreateErrorInfo* pCreateErrorInfo;
12+
if (FAILED(CreateErrorInfo(&pCreateErrorInfo)))
1313
return;
1414

15-
// Set rich error information.
15+
// Set rich error information.
1616
pCreateErrorInfo->SetDescription(errorMsg);
17-
//pCreateErrorInfo->SetGUID(IID_MapFile);
17+
//pCreateErrorInfo->SetGUID(IID_MapFile);
1818

19-
// Exchange ICreateErrorInfo for IErrorInfo.
20-
IErrorInfo* pErrorInfo;
21-
pCreateErrorInfo->QueryInterface(IID_IErrorInfo,
22-
(void**)&pErrorInfo);
19+
// Exchange ICreateErrorInfo for IErrorInfo.
20+
IErrorInfo* pErrorInfo;
21+
pCreateErrorInfo->QueryInterface(IID_IErrorInfo,
22+
(void**)&pErrorInfo);
2323

24-
// Make the error information available to the client.
25-
SetErrorInfo(NULL, pErrorInfo);
24+
// Make the error information available to the client.
25+
SetErrorInfo(NULL, pErrorInfo);
2626

27-
// Release the interface pointers.
28-
pErrorInfo->Release();
29-
pCreateErrorInfo->Release();
27+
// Release the interface pointers.
28+
pErrorInfo->Release();
29+
pCreateErrorInfo->Release();
3030
}
3131

3232

OP2Editor.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ HINSTANCE g_hInstance = NULL;
2626
extern "C"
2727
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
2828
{
29-
if (dwReason == DLL_PROCESS_ATTACH)
30-
{
29+
if (dwReason == DLL_PROCESS_ATTACH)
30+
{
3131
g_hInstance = hInstance;
32-
DisableThreadLibraryCalls(hInstance);
33-
}
32+
DisableThreadLibraryCalls(hInstance);
33+
}
3434

35-
return TRUE; // ok
35+
return TRUE; // ok
3636
}
3737

3838
// Used to determine whether the DLL can be unloaded by OLE
@@ -47,17 +47,17 @@ STDAPI DllCanUnloadNow(void)
4747
// Returns a class factory to create an object of the requested type
4848
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
4949
{
50-
if(rclsid != CLSID_ResourceManager)
51-
return CLASS_E_CLASSNOTAVAILABLE;
50+
if(rclsid != CLSID_ResourceManager)
51+
return CLASS_E_CLASSNOTAVAILABLE;
5252

53-
CResourceManagerFactory *pFactory = new CResourceManagerFactory();
54-
if(pFactory == NULL)
55-
return E_OUTOFMEMORY;
53+
CResourceManagerFactory *pFactory = new CResourceManagerFactory();
54+
if(pFactory == NULL)
55+
return E_OUTOFMEMORY;
5656

57-
// riid is probably IID_IClassFactory.
58-
HRESULT hr = pFactory->QueryInterface(riid, ppv);
59-
pFactory->Release(); // Just in case QueryInterface fails
60-
return hr;
57+
// riid is probably IID_IClassFactory.
58+
HRESULT hr = pFactory->QueryInterface(riid, ppv);
59+
pFactory->Release(); // Just in case QueryInterface fails
60+
return hr;
6161
}
6262

6363
// DllRegisterServer - Adds entries to the system registry

0 commit comments

Comments
 (0)