wined3d: Remove a redundant initialization of cfgs in CheckDepthStencilCapability. (LLVM/Clang)

Henri Verbeet hverbeet at codeweavers.com
Wed Oct 8 09:37:00 CDT 2008


---
 dlls/wined3d/directx.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index fd0d290..5fa091e 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -2005,7 +2005,6 @@ static BOOL CheckBumpMapCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
 static BOOL CheckDepthStencilCapability(UINT Adapter, WINED3DFORMAT DisplayFormat, WINED3DFORMAT DepthStencilFormat)
 {
     int it=0;
-    WineD3D_PixelFormat *cfgs = Adapters[Adapter].cfgs;
     const GlPixelFormatDesc *glDesc;
     const StaticPixelFormatDesc *desc = getFormatDescEntry(DepthStencilFormat, &GLINFO_LOCATION, &glDesc);
 
@@ -2018,10 +2017,10 @@ static BOOL CheckDepthStencilCapability(UINT Adapter, WINED3DFORMAT DisplayForma
         return FALSE;
 
     /* Walk through all WGL pixel formats to find a match */
-    cfgs = Adapters[Adapter].cfgs;
     for (it = 0; it < Adapters[Adapter].nCfgs; ++it) {
-        if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(&cfgs[it], DisplayFormat)) {
-            if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(&cfgs[it], DepthStencilFormat)) {
+        WineD3D_PixelFormat *cfg = &Adapters[Adapter].cfgs[it];
+        if (IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(cfg, DisplayFormat)) {
+            if (IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(cfg, DepthStencilFormat)) {
                 return TRUE;
             }
         }
-- 
1.5.6.4



--------------090705050500030904080609--



More information about the wine-patches mailing list