summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-09-16 18:43:08 +0300
committerTor Lillqvist <tml@collabora.com>2013-09-16 18:46:13 +0300
commit19fd14a8ed09f1ab4c7bf9ae49df3131daea7d51 (patch)
treeb0b9e3a6cf0d3979caa8f53d2d6feab7b6d00b01 /svx
parent0ff9244d8aa8ba46025d8ae9d2e0f83385793165 (diff)
Correct use of && where only & makes sense
Shows up as a warning from Clang: use of logical '&&' with constant operand I wonder how many cases we have where && is used instead of & but with both operands non-constant, thus not causing any warning? Change-Id: I8fbbcf9c08f54f8803a08a4e8c54d7bd873af800
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/PanelLayout.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 9712b260867a..003ca3e1ecf3 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -36,9 +36,9 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, s
if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW)
{
WinBits nStyle = pChild->GetStyle();
- if (nStyle && (WB_AUTOHSCROLL | WB_HSCROLL))
+ if (nStyle & (WB_AUTOHSCROLL | WB_HSCROLL))
bCanHandleSmallerWidth = true;
- if (nStyle && (WB_AUTOVSCROLL | WB_VSCROLL))
+ if (nStyle & (WB_AUTOVSCROLL | WB_VSCROLL))
bCanHandleSmallerHeight = true;
}