Michael Stefaniuc : clock: Use wide-char string literals.

Alexandre Julliard julliard at winehq.org
Tue Oct 6 15:33:09 CDT 2020


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Mon Oct  5 23:22:48 2020 +0200

clock: Use wide-char string literals.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/clock/main.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/programs/clock/main.c b/programs/clock/main.c
index 3ad636be43..43364745ea 100644
--- a/programs/clock/main.c
+++ b/programs/clock/main.c
@@ -104,10 +104,9 @@ static BOOL CLOCK_ResetTimer(void)
 	period = 1000;
 
     if (!SetTimer (Globals.hMainWnd, TIMER_ID, period, NULL)) {
-        static const WCHAR notimersW[] = {'N','o',' ','a','v','a','i','l','a','b','l','e',' ','t','i','m','e','r','s',0};
         WCHAR szApp[MAX_STRING_LEN];
         LoadStringW(Globals.hInstance, IDS_CLOCK, szApp, MAX_STRING_LEN);
-        MessageBoxW(0, notimersW, szApp, MB_ICONEXCLAMATION | MB_OK);
+        MessageBoxW(0, L"No available timers", szApp, MB_ICONEXCLAMATION | MB_OK);
         return FALSE;
     }
     return TRUE;
@@ -390,9 +389,6 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
     MSG      msg;
     WNDCLASSW class;
 
-    static const WCHAR szClassName[] = {'C','L','C','l','a','s','s',0};
-    static const WCHAR szWinName[]   = {'C','l','o','c','k',0};
-
     /* Setup Globals */
     memset(&Globals.hFont, 0, sizeof (Globals.hFont));
     Globals.bAnalog         = TRUE;
@@ -408,13 +404,13 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
         class.hCursor       = LoadCursorW(0, (LPCWSTR)IDC_ARROW);
         class.hbrBackground = 0;
         class.lpszMenuName  = 0;
-        class.lpszClassName = szClassName;
+        class.lpszClassName = L"CLClass";
     }
-    
+
     if (!RegisterClassW(&class)) return FALSE;
-    
+
     Globals.MaxX = Globals.MaxY = INITIAL_WINDOW_SIZE;
-    Globals.hMainWnd = CreateWindowW(szClassName, szWinName, WS_OVERLAPPEDWINDOW,
+    Globals.hMainWnd = CreateWindowW(L"CLClass", L"Clock", WS_OVERLAPPEDWINDOW,
                                      CW_USEDEFAULT, CW_USEDEFAULT,
                                      Globals.MaxX, Globals.MaxY, 0,
                                      0, hInstance, 0);




More information about the wine-cvs mailing list