Remove redundant checks from conditional statements.
It is not necessary to test for the condition which is already known to be true or false because the code is inside the if statement checking it. See #15893. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -667,7 +667,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog)
|
|||||||
wxScrolledWindow* scrolledWindow = wxDynamicCast(page, wxScrolledWindow);
|
wxScrolledWindow* scrolledWindow = wxDynamicCast(page, wxScrolledWindow);
|
||||||
if (scrolledWindow)
|
if (scrolledWindow)
|
||||||
windows.Append(scrolledWindow);
|
windows.Append(scrolledWindow);
|
||||||
else if (!scrolledWindow && page->GetSizer())
|
else if (page->GetSizer())
|
||||||
{
|
{
|
||||||
// Create a scrolled window and reparent
|
// Create a scrolled window and reparent
|
||||||
scrolledWindow = CreateScrolledWindow(page);
|
scrolledWindow = CreateScrolledWindow(page);
|
||||||
|
@@ -10184,10 +10184,10 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const
|
|||||||
percentageColWidths[i] = percentageCellWidth;
|
percentageColWidths[i] = percentageCellWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colSpan == 1 && cell->GetMinSize().x && cell->GetMinSize().x > minColWidths[i])
|
if (cell->GetMinSize().x && cell->GetMinSize().x > minColWidths[i])
|
||||||
minColWidths[i] = cell->GetMinSize().x;
|
minColWidths[i] = cell->GetMinSize().x;
|
||||||
|
|
||||||
if (colSpan == 1 && cell->GetMaxSize().x && cell->GetMaxSize().x > maxColWidths[i])
|
if (cell->GetMaxSize().x && cell->GetMaxSize().x > maxColWidths[i])
|
||||||
maxColWidths[i] = cell->GetMaxSize().x;
|
maxColWidths[i] = cell->GetMaxSize().x;
|
||||||
|
|
||||||
if (cell->GetAttributes().GetTextBoxAttr().HasWhitespaceMode() &&
|
if (cell->GetAttributes().GetTextBoxAttr().HasWhitespaceMode() &&
|
||||||
|
Reference in New Issue
Block a user