Nikolay Sivov : msdmo: Remove a helper only used once.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 23 07:04:14 CDT 2015


Module: wine
Branch: master
Commit: 65bf359d6faed5e75a0806223780bd50a6094789
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=65bf359d6faed5e75a0806223780bd50a6094789

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Apr 22 23:06:35 2015 +0300

msdmo: Remove a helper only used once.

---

 dlls/msdmo/dmoreg.c | 33 +++++++++------------------------
 1 file changed, 9 insertions(+), 24 deletions(-)

diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c
index 4bd7ab4..f42bc56 100644
--- a/dlls/msdmo/dmoreg.c
+++ b/dlls/msdmo/dmoreg.c
@@ -19,6 +19,8 @@
 
 #include <stdarg.h>
 
+#define COBJMACROS
+
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
@@ -359,23 +361,6 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[])
 }
 
 /**************************************************************************
-*   IEnumDMOImpl_Destructor
-*/
-static BOOL IEnumDMOImpl_Destructor(IEnumDMOImpl* This)
-{
-    TRACE("%p\n", This);
-
-    if (This->hkey)
-        RegCloseKey(This->hkey);
-
-    HeapFree(GetProcessHeap(), 0, This->pInTypes);
-    HeapFree(GetProcessHeap(), 0, This->pOutTypes);
-
-    return TRUE;
-}
-
-
-/**************************************************************************
  *  IEnumDMO_Constructor
  */
 static HRESULT IEnumDMO_Constructor(
@@ -450,10 +435,7 @@ static HRESULT IEnumDMO_Constructor(
 lerr:
 
     if (FAILED(hr))
-    {
-        IEnumDMOImpl_Destructor(lpedmo);
-        HeapFree(GetProcessHeap(), 0, lpedmo);
-    }
+        IEnumDMO_Release(&lpedmo->IEnumDMO_iface);
     else
     {
         TRACE("returning %p\n", lpedmo);
@@ -489,7 +471,7 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface(IEnumDMO* iface, REFIID riid, vo
         IsEqualIID(riid, &IID_IUnknown))
     {
         *ppvObj = iface;
-        IEnumDMO_fnAddRef(iface);
+        IEnumDMO_AddRef(iface);
     }
 
     return *ppvObj ? S_OK : E_NOINTERFACE;
@@ -507,8 +489,11 @@ static ULONG WINAPI IEnumDMO_fnRelease(IEnumDMO * iface)
 
     if (!refCount)
     {
-        IEnumDMOImpl_Destructor(This);
-        HeapFree(GetProcessHeap(),0,This);
+        if (This->hkey)
+            RegCloseKey(This->hkey);
+        HeapFree(GetProcessHeap(), 0, This->pInTypes);
+        HeapFree(GetProcessHeap(), 0, This->pOutTypes);
+        HeapFree(GetProcessHeap(), 0, This);
     }
     return refCount;
 }




More information about the wine-cvs mailing list