[PATCH 1/5] riched20: Remove always false conditions.
Huw Davies
huw at codeweavers.com
Fri Mar 19 04:14:13 CDT 2021
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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,
--
2.23.0
More information about the wine-devel
mailing list