Fixed code checking for bit flags.
Use "flag & bitmask" instead of "flag && bitmask" (resulted in LLVM compiler warning: "Use of logical '&&' with constant operand"). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
546a948206
commit
8848bb8369
@ -2070,7 +2070,7 @@ void wxRichTextCtrl::MoveCaretBack(long oldPosition)
|
||||
bool wxRichTextCtrl::MoveRight(int noPositions, int flags)
|
||||
{
|
||||
// Test for continuing table selection
|
||||
if (flags && wxRICHTEXT_SHIFT_DOWN)
|
||||
if (flags & wxRICHTEXT_SHIFT_DOWN)
|
||||
{
|
||||
if (m_selection.GetContainer() && m_selection.GetContainer()->IsKindOf(CLASSINFO(wxRichTextTable)))
|
||||
{
|
||||
@ -2120,7 +2120,7 @@ bool wxRichTextCtrl::MoveRight(int noPositions, int flags)
|
||||
wxRichTextParagraphLayoutBox* actualContainer = wxDynamicCast(contextObj, wxRichTextParagraphLayoutBox);
|
||||
if (actualContainer && actualContainer != GetFocusObject() && actualContainer->AcceptsFocus() && actualContainer->IsShown())
|
||||
{
|
||||
if ((flags && wxRICHTEXT_SHIFT_DOWN) &&
|
||||
if ((flags & wxRICHTEXT_SHIFT_DOWN) &&
|
||||
GetFocusObject()->IsKindOf(CLASSINFO(wxRichTextCell)) &&
|
||||
actualContainer->IsKindOf(CLASSINFO(wxRichTextCell)) &&
|
||||
GetFocusObject()->GetParent() == actualContainer->GetParent())
|
||||
@ -2233,7 +2233,7 @@ bool wxRichTextCtrl::MoveDown(int noLines, int flags)
|
||||
return false;
|
||||
|
||||
// Test for continuing table selection
|
||||
if (flags && wxRICHTEXT_SHIFT_DOWN)
|
||||
if (flags & wxRICHTEXT_SHIFT_DOWN)
|
||||
{
|
||||
if (m_selection.GetContainer() && m_selection.GetContainer()->IsKindOf(CLASSINFO(wxRichTextTable)))
|
||||
{
|
||||
@ -2319,7 +2319,7 @@ bool wxRichTextCtrl::MoveDown(int noLines, int flags)
|
||||
wxRichTextParagraphLayoutBox* actualContainer = wxDynamicCast(contextObj, wxRichTextParagraphLayoutBox);
|
||||
if (actualContainer && actualContainer != GetFocusObject() && actualContainer->AcceptsFocus())
|
||||
{
|
||||
if ((flags && wxRICHTEXT_SHIFT_DOWN) &&
|
||||
if ((flags & wxRICHTEXT_SHIFT_DOWN) &&
|
||||
GetFocusObject()->IsKindOf(CLASSINFO(wxRichTextCell)) &&
|
||||
actualContainer->IsKindOf(CLASSINFO(wxRichTextCell)) &&
|
||||
GetFocusObject()->GetParent() == actualContainer->GetParent())
|
||||
|
Loading…
Reference in New Issue
Block a user