Zebediah Figura : msdmo: Avoid a redundant string -> GUID conversion.

Alexandre Julliard julliard at winehq.org
Fri Jul 10 16:30:31 CDT 2020


Module: wine
Branch: master
Commit: 42a8f382ed07595ab093a4da6452814099275e16
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=42a8f382ed07595ab093a4da6452814099275e16

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Fri Jul 10 11:42:47 2020 -0500

msdmo: Avoid a redundant string -> GUID conversion.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msdmo/dmoreg.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/dlls/msdmo/dmoreg.c b/dlls/msdmo/dmoreg.c
index ffe64782d1..3143cfc5e2 100644
--- a/dlls/msdmo/dmoreg.c
+++ b/dlls/msdmo/dmoreg.c
@@ -75,12 +75,6 @@ static const WCHAR szCat2Fmt[] =
     '%','s','\\','%','s',0
 };
 
-static const WCHAR szToGuidFmt[] =
-{
-    '{','%','s','}',0
-};
-
-
 typedef struct
 {
     IEnumDMO                    IEnumDMO_iface;
@@ -482,7 +476,6 @@ static HRESULT WINAPI IEnumDMO_fnNext(
 {
     HKEY hkey;
     WCHAR szNextKey[MAX_PATH];
-    WCHAR szGuidKey[64];
     WCHAR szKey[MAX_PATH];
     WCHAR szValue[MAX_PATH];
     DMO_PARTIAL_MEDIATYPE types[100];
@@ -490,7 +483,6 @@ static HRESULT WINAPI IEnumDMO_fnNext(
     UINT count = 0;
     HRESULT hres = S_OK;
     LONG ret;
-    GUID guid;
 
     IEnumDMOImpl *This = impl_from_IEnumDMO(iface);
 
@@ -514,7 +506,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
             break;
         }
 
-        if (string_to_guid(szNextKey, &guid) != S_OK)
+        if (string_to_guid(szNextKey, &pCLSID[count]) != S_OK)
             continue;
 
         TRACE("found %s\n", debugstr_w(szNextKey));
@@ -622,8 +614,6 @@ static HRESULT WINAPI IEnumDMO_fnNext(
                     lstrcpyW(Names[count], szValue);
             }
         }
-        wsprintfW(szGuidKey,szToGuidFmt,szNextKey);
-        CLSIDFromString(szGuidKey, &pCLSID[count]);
 
         TRACE("found match %s %s\n", debugstr_w(szValue), debugstr_w(szNextKey));
         RegCloseKey(hkey);




More information about the wine-cvs mailing list