From 8cca19809be5e4dff1fe99813c53a622f3dd8271 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 20 Jan 2014 14:45:35 +0000 Subject: [PATCH] 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 --- src/common/dlgcmn.cpp | 2 +- src/richtext/richtextbuffer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index fae5b7f8d2..a8e1527df9 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -667,7 +667,7 @@ bool wxStandardDialogLayoutAdapter::DoLayoutAdaptation(wxDialog* dialog) wxScrolledWindow* scrolledWindow = wxDynamicCast(page, wxScrolledWindow); if (scrolledWindow) windows.Append(scrolledWindow); - else if (!scrolledWindow && page->GetSizer()) + else if (page->GetSizer()) { // Create a scrolled window and reparent scrolledWindow = CreateScrolledWindow(page); diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 04fc44bfde..39f0c5993b 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -10184,10 +10184,10 @@ bool wxRichTextTable::Layout(wxDC& dc, wxRichTextDrawingContext& context, const 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; - 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; if (cell->GetAttributes().GetTextBoxAttr().HasWhitespaceMode() &&