Alex Henrie : browseui: Have a single empty wide string at the top of progressdlg.c.
Alexandre Julliard
julliard at winehq.org
Tue Dec 4 16:33:55 CST 2018
Module: wine
Branch: master
Commit: be8870d5ea54865ba24a222cd5eec0d548b780cc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=be8870d5ea54865ba24a222cd5eec0d548b780cc
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Fri Nov 30 00:14:00 2018 -0700
browseui: Have a single empty wide string at the top of progressdlg.c.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/browseui/progressdlg.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/browseui/progressdlg.c b/dlls/browseui/progressdlg.c
index e10d8bd..61078a1 100644
--- a/dlls/browseui/progressdlg.c
+++ b/dlls/browseui/progressdlg.c
@@ -89,9 +89,10 @@ static inline ProgressDialog *impl_from_IOleWindow(IOleWindow *iface)
return CONTAINING_RECORD(iface, ProgressDialog, IOleWindow_iface);
}
+static const WCHAR empty_string[] = {0};
+
static void set_buffer(LPWSTR *buffer, LPCWSTR string)
{
- static const WCHAR empty_string[] = {0};
IMalloc *malloc;
ULONG cb;
@@ -132,15 +133,13 @@ static void set_progress_marquee(ProgressDialog *This)
static void update_dialog(ProgressDialog *This, DWORD dwUpdate)
{
- WCHAR empty[] = {0};
-
if (dwUpdate & UPDATE_TITLE)
SetWindowTextW(This->hwnd, This->title);
if (dwUpdate & UPDATE_LINE1)
- SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE, (This->isCancelled ? empty : This->lines[0]));
+ SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE, (This->isCancelled ? empty_string : This->lines[0]));
if (dwUpdate & UPDATE_LINE2)
- SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+1, (This->isCancelled ? empty : This->lines[1]));
+ SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+1, (This->isCancelled ? empty_string : This->lines[1]));
if (dwUpdate & UPDATE_LINE3)
SetDlgItemTextW(This->hwnd, IDC_TEXT_LINE+2, (This->isCancelled ? This->cancelMsg : This->lines[2]));
More information about the wine-cvs
mailing list