Do not use 'assert( false )', with NDEBUG that is a no-op and
results in warnings about missing return. svn path=/trunk/KDE/kdebase/workspace/; revision=861879
This commit is contained in:
parent
a3e834fb99
commit
08571b2f52
7 changed files with 16 additions and 18 deletions
|
@ -439,7 +439,7 @@ void Client::detectNoBorder()
|
|||
noborder = false;
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
abort();
|
||||
}
|
||||
// NET::Override is some strange beast without clear definition, usually
|
||||
// just meaning "noborder", so let's treat it only as such flag, and ignore it as
|
||||
|
|
|
@ -612,7 +612,7 @@ void EffectsHandlerImpl::destroyInputWindow( Window w )
|
|||
return;
|
||||
}
|
||||
}
|
||||
assert( false );
|
||||
abort();
|
||||
}
|
||||
|
||||
bool EffectsHandlerImpl::checkInputWindowEvent( XEvent* e )
|
||||
|
|
|
@ -1330,7 +1330,7 @@ EffectWindow* PresentWindowsEffect::relativeWindow( EffectWindow* w, int xdiff,
|
|||
}
|
||||
}
|
||||
|
||||
assert( false ); // Should never get here
|
||||
abort(); // Should never get here
|
||||
}
|
||||
|
||||
EffectWindow* PresentWindowsEffect::relativeWindowGrid( EffectWindow* w, int xdiff, int ydiff, bool wrap ) const
|
||||
|
|
18
geometry.cpp
18
geometry.cpp
|
@ -271,8 +271,7 @@ QRect Workspace::clientArea( clientAreaOption opt, int screen, int desktop ) con
|
|||
case ScreenArea:
|
||||
return desktopwidget->screenGeometry( screen );
|
||||
}
|
||||
assert( false );
|
||||
return QRect();
|
||||
abort();
|
||||
}
|
||||
|
||||
QRect Workspace::clientArea( clientAreaOption opt, const QPoint& p, int desktop ) const
|
||||
|
@ -555,7 +554,7 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
|
|||
SNAP_BORDER_LEFT
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -688,7 +687,7 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
|
|||
SNAP_WINDOW_C_LEFT
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1611,9 +1610,8 @@ void Client::configureRequest( int value_mask, int rx, int ry, int rw, int rh, i
|
|||
|
||||
void Client::resizeWithChecks( int w, int h, ForceGeometry_t force )
|
||||
{
|
||||
if( shade_geometry_change )
|
||||
assert( false );
|
||||
else if( isShade())
|
||||
assert( !shade_geometry_change );
|
||||
if( isShade())
|
||||
{
|
||||
if( h == border_top + border_bottom )
|
||||
{
|
||||
|
@ -2722,7 +2720,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
|
|||
break;
|
||||
case PositionCenter:
|
||||
default:
|
||||
assert( false );
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2777,7 +2775,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
|
|||
break;
|
||||
case PositionCenter:
|
||||
default:
|
||||
assert( false );
|
||||
abort();
|
||||
break;
|
||||
}
|
||||
if( moveResizeGeom.size() != previousMoveResizeGeom.size())
|
||||
|
@ -2812,7 +2810,7 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
|
|||
update = true;
|
||||
}
|
||||
else
|
||||
assert( false );
|
||||
abort();
|
||||
|
||||
if( isResize())
|
||||
{
|
||||
|
|
|
@ -175,7 +175,7 @@ static void checkTransiency()
|
|||
{
|
||||
kdDebug() << "BT:" << transiencyCheckStartBt << endl;
|
||||
kdDebug() << "CLIENT:" << transiencyCheckClient << endl;
|
||||
assert( false );
|
||||
abort();
|
||||
}
|
||||
transiencyCheckNonExistent = false;
|
||||
}
|
||||
|
|
|
@ -1019,7 +1019,7 @@ void SceneOpenGL::Texture::findTarget()
|
|||
mScale.setHeight( 1.0f );
|
||||
break;
|
||||
default:
|
||||
assert( false );
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2466,7 +2466,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
|
|||
if( message == "noborderaltf3" )
|
||||
{
|
||||
KAction* action = qobject_cast<KAction*>(keys->action( "Window Operations Menu" ));
|
||||
if (action==0) assert( false );
|
||||
assert( action != NULL );
|
||||
QString shortcut = QString( "%1 (%2)" ).arg( action->text() )
|
||||
.arg( action->globalShortcut().primary().toString());
|
||||
args << "--msgbox" <<
|
||||
|
@ -2480,7 +2480,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
|
|||
else if( message == "fullscreenaltf3" )
|
||||
{
|
||||
KAction* action = qobject_cast<KAction*>(keys->action( "Window Operations Menu" ));
|
||||
if (action==0) assert( false );
|
||||
assert( action != NULL );
|
||||
QString shortcut = QString( "%1 (%2)" ).arg( action->text() )
|
||||
.arg( action->globalShortcut().primary().toString());
|
||||
args << "--msgbox" <<
|
||||
|
@ -2493,7 +2493,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
|
|||
type = "altf3warning";
|
||||
}
|
||||
else
|
||||
assert( false );
|
||||
abort();
|
||||
if( !type.isEmpty())
|
||||
{
|
||||
KConfig cfg( "kwin_dialogsrc" );
|
||||
|
|
Loading…
Reference in a new issue