Kaydet (Commit) 19fd14a8 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst 0ff9244d
...@@ -36,9 +36,9 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, s ...@@ -36,9 +36,9 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, s
if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW) if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW)
{ {
WinBits nStyle = pChild->GetStyle(); WinBits nStyle = pChild->GetStyle();
if (nStyle && (WB_AUTOHSCROLL | WB_HSCROLL)) if (nStyle & (WB_AUTOHSCROLL | WB_HSCROLL))
bCanHandleSmallerWidth = true; bCanHandleSmallerWidth = true;
if (nStyle && (WB_AUTOVSCROLL | WB_VSCROLL)) if (nStyle & (WB_AUTOVSCROLL | WB_VSCROLL))
bCanHandleSmallerHeight = true; bCanHandleSmallerHeight = true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment