From b8cdabbd20690d57930dce9dda949fca21a6233a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 1 Sep 2011 20:04:35 +0300 Subject: Eliminate asserts from most files. --- src/gui/widgets/layout.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/layout.cpp') diff --git a/src/gui/widgets/layout.cpp b/src/gui/widgets/layout.cpp index 382d169dc..a14b416ce 100644 --- a/src/gui/widgets/layout.cpp +++ b/src/gui/widgets/layout.cpp @@ -68,7 +68,9 @@ LayoutArray &LayoutCell::getArray() void LayoutCell::reflow(int nx, int ny, int nw, int nh) { - assert(mType != NONE); + if (mType == NONE) + return; + nx += mHPadding; ny += mVPadding; nw -= 2 * mHPadding; @@ -81,7 +83,8 @@ void LayoutCell::reflow(int nx, int ny, int nw, int nh) void LayoutCell::computeSizes() { - assert(mType == ARRAY); + if (mType != ARRAY) + return; std::vector< std::vector< LayoutCell * > >::iterator i = mArray->mCells.begin(); -- cgit v1.2.3-60-g2f50