Huw Davies : riched20: Remove always false conditions.

Alexandre Julliard julliard at winehq.org
Fri Mar 19 16:42:01 CDT 2021


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Mar 19 09:14:13 2021 +0000

riched20: Remove always false conditions.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/riched20/paint.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 607ced52089..b9173196aa2 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -1198,11 +1198,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
 
   if (editor->scrollbars & WS_HSCROLL)
   {
-    if (si.fMask & SIF_DISABLENOSCROLL) {
-      bScrollBarWillBeVisible = TRUE;
-    } else if (!(editor->scrollbars & WS_HSCROLL)) {
-      bScrollBarWillBeVisible = FALSE;
-    }
+    if (si.fMask & SIF_DISABLENOSCROLL) bScrollBarWillBeVisible = TRUE;
 
     if (bScrollBarWasVisible != bScrollBarWillBeVisible)
       ITextHost_TxShowScrollBar(editor->texthost, SB_HORZ, bScrollBarWillBeVisible);
@@ -1253,11 +1249,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
 
   if (editor->scrollbars & WS_VSCROLL)
   {
-    if (si.fMask & SIF_DISABLENOSCROLL) {
-      bScrollBarWillBeVisible = TRUE;
-    } else if (!(editor->scrollbars & WS_VSCROLL)) {
-      bScrollBarWillBeVisible = FALSE;
-    }
+    if (si.fMask & SIF_DISABLENOSCROLL) bScrollBarWillBeVisible = TRUE;
 
     if (bScrollBarWasVisible != bScrollBarWillBeVisible)
       ITextHost_TxShowScrollBar(editor->texthost, SB_VERT,




More information about the wine-cvs mailing list