[PATCH] ddrawex: Tweak the createDD() name to make CodeSpell happy.

Francois Gouget fgouget at free.fr
Sat Sep 7 23:23:50 CDT 2019


Signed-off-by: Francois Gouget <fgouget at free.fr>
---

Duplicating the trailing 'd' seems to be a common typo so CodeSpell 
complains about 'createdd'. Since this is about DirectDraw this spelling 
warning is easy to avoid and may even make the function name more 
obvious to someone reading the code for the first time. So I propose to 
rename it to createDDraw() to stay in spirit.

 dlls/ddrawex/tests/ddrawex.c |  4 ++--
 dlls/ddrawex/tests/surface.c | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c
index 7134a0478cd..60d84fe991b 100644
--- a/dlls/ddrawex/tests/ddrawex.c
+++ b/dlls/ddrawex/tests/ddrawex.c
@@ -27,7 +27,7 @@
 static IDirectDrawFactory *factory;
 static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, void **out);
 
-static IDirectDraw *createDD(void)
+static IDirectDraw *createDDraw(void)
 {
     HRESULT hr;
     IDirectDraw *dd;
@@ -46,7 +46,7 @@ static ULONG get_ref(IUnknown *o)
 
 static void RefCountTest(void)
 {
-    IDirectDraw *dd1 = createDD();
+    IDirectDraw *dd1 = createDDraw();
     IDirectDraw2 *dd2;
     IDirectDraw3 *dd3;
     IDirectDraw4 *dd4;
diff --git a/dlls/ddrawex/tests/surface.c b/dlls/ddrawex/tests/surface.c
index c6c02a83583..3081cfe2514 100644
--- a/dlls/ddrawex/tests/surface.c
+++ b/dlls/ddrawex/tests/surface.c
@@ -29,7 +29,7 @@
 static IDirectDrawFactory *factory;
 static HRESULT (WINAPI *pDllGetClassObject)(REFCLSID rclsid, REFIID riid, void **out);
 
-static IDirectDraw *createDD(void)
+static IDirectDraw *createDDraw(void)
 {
     HRESULT hr;
     IDirectDraw *dd;
@@ -74,7 +74,7 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te
     IDirectDrawSurface2 *surf3;
     IDirectDrawSurface4 *surf4;
     HRESULT hr;
-    IDirectDraw  *dd1 = createDD();
+    IDirectDraw  *dd1 = createDDraw();
     IDirectDraw2 *dd2;
     IDirectDraw3 *dd3;
     IDirectDraw4 *dd4;
@@ -156,7 +156,7 @@ static void GetDCTest(void)
 static void CapsTest(void)
 {
     DDSURFACEDESC ddsd;
-    IDirectDraw  *dd1 = createDD();
+    IDirectDraw  *dd1 = createDDraw();
     IDirectDrawSurface *surf;
     HRESULT hr;
 
@@ -247,7 +247,7 @@ static void test_surface_from_dc3(void)
     HRESULT hr;
     HDC dc;
 
-    dd1 = createDD();
+    dd1 = createDDraw();
     hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **)&dd3);
     ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#x.\n", hr);
     IDirectDraw_Release(dd1);
@@ -314,7 +314,7 @@ static void test_surface_from_dc4(void)
     HRESULT hr;
     HDC dc;
 
-    dd1 = createDD();
+    dd1 = createDDraw();
     hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **)&dd4);
     if (hr == E_NOINTERFACE) {
         win_skip("DirectDraw4 is not supported\n");
-- 
2.20.1




More information about the wine-devel mailing list