VIEW: changed wxASSERTs to wxCHECKs
This commit is contained in:
parent
17205b4599
commit
f948e46330
|
@ -372,7 +372,7 @@ void VIEW::Remove( VIEW_ITEM* aItem )
|
|||
if( !viewData )
|
||||
return;
|
||||
|
||||
wxASSERT( viewData->m_view == this );
|
||||
wxCHECK( viewData->m_view == this, /*void*/ );
|
||||
auto item = std::find( m_allItems->begin(), m_allItems->end(), aItem );
|
||||
|
||||
if( item != m_allItems->end() )
|
||||
|
@ -404,8 +404,8 @@ void VIEW::Remove( VIEW_ITEM* aItem )
|
|||
|
||||
void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired )
|
||||
{
|
||||
wxASSERT( (unsigned) aLayerId < m_layers.size() );
|
||||
wxASSERT( (unsigned) aRequiredId < m_layers.size() );
|
||||
wxCHECK( (unsigned) aLayerId < m_layers.size(), /*void*/ );
|
||||
wxCHECK( (unsigned) aRequiredId < m_layers.size(), /*void*/ );
|
||||
|
||||
if( aRequired )
|
||||
m_layers[aLayerId].requiredLayers.insert( aRequiredId );
|
||||
|
@ -538,7 +538,7 @@ void VIEW::SetViewport( const BOX2D& aViewport )
|
|||
{
|
||||
VECTOR2D ssize = ToWorld( m_gal->GetScreenPixelSize(), false );
|
||||
|
||||
wxASSERT( ssize.x > 0 && ssize.y > 0 );
|
||||
wxCHECK( ssize.x > 0 && ssize.y > 0, /*void*/ );
|
||||
|
||||
VECTOR2D centre = aViewport.Centre();
|
||||
VECTOR2D vsize = aViewport.GetSize();
|
||||
|
@ -953,7 +953,7 @@ struct VIEW::drawItem
|
|||
|
||||
bool operator()( VIEW_ITEM* aItem )
|
||||
{
|
||||
wxASSERT( aItem->viewPrivData() );
|
||||
wxCHECK( aItem->viewPrivData(), false );
|
||||
|
||||
// Conditions that have to be fulfilled for an item to be drawn
|
||||
bool drawCondition = aItem->viewPrivData()->isRenderable() &&
|
||||
|
@ -1255,8 +1255,8 @@ void VIEW::sortLayers()
|
|||
void VIEW::updateItemColor( VIEW_ITEM* aItem, int aLayer )
|
||||
{
|
||||
auto viewData = aItem->viewPrivData();
|
||||
wxASSERT( (unsigned) aLayer < m_layers.size() );
|
||||
wxASSERT( IsCached( aLayer ) );
|
||||
wxCHECK( (unsigned) aLayer < m_layers.size(), /*void*/ );
|
||||
wxCHECK( IsCached( aLayer ), /*void*/ );
|
||||
|
||||
if( !viewData )
|
||||
return;
|
||||
|
@ -1274,8 +1274,8 @@ void VIEW::updateItemColor( VIEW_ITEM* aItem, int aLayer )
|
|||
void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer )
|
||||
{
|
||||
auto viewData = aItem->viewPrivData();
|
||||
wxASSERT( (unsigned) aLayer < m_layers.size() );
|
||||
wxASSERT( IsCached( aLayer ) );
|
||||
wxCHECK( (unsigned) aLayer < m_layers.size(), /*void*/ );
|
||||
wxCHECK( IsCached( aLayer ), /*void*/ );
|
||||
|
||||
if( !viewData )
|
||||
return;
|
||||
|
@ -1362,7 +1362,7 @@ void VIEW::updateLayers( VIEW_ITEM* aItem )
|
|||
|
||||
bool VIEW::areRequiredLayersEnabled( int aLayerId ) const
|
||||
{
|
||||
wxASSERT( (unsigned) aLayerId < m_layers.size() );
|
||||
wxCHECK( (unsigned) aLayerId < m_layers.size(), false );
|
||||
|
||||
std::set<int>::const_iterator it, it_end;
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ public:
|
|||
*/
|
||||
inline void SetLayerVisible( int aLayer, bool aVisible = true )
|
||||
{
|
||||
wxASSERT( aLayer < (int) m_layers.size() );
|
||||
wxCHECK( aLayer < (int) m_layers.size(), /*void*/ );
|
||||
|
||||
if( m_layers[aLayer].visible != aVisible )
|
||||
{
|
||||
|
@ -426,13 +426,13 @@ public:
|
|||
*/
|
||||
inline bool IsLayerVisible( int aLayer ) const
|
||||
{
|
||||
wxASSERT( aLayer < (int) m_layers.size() );
|
||||
wxCHECK( aLayer < (int) m_layers.size(), false );
|
||||
return m_layers.at( aLayer ).visible;
|
||||
}
|
||||
|
||||
inline void SetLayerDisplayOnly( int aLayer, bool aDisplayOnly = true )
|
||||
{
|
||||
wxASSERT( aLayer < (int) m_layers.size() );
|
||||
wxCHECK( aLayer < (int) m_layers.size(), /*void*/ );
|
||||
m_layers[aLayer].displayOnly = aDisplayOnly;
|
||||
}
|
||||
|
||||
|
@ -444,7 +444,7 @@ public:
|
|||
*/
|
||||
inline void SetLayerTarget( int aLayer, RENDER_TARGET aTarget )
|
||||
{
|
||||
wxASSERT( aLayer < (int) m_layers.size() );
|
||||
wxCHECK( aLayer < (int) m_layers.size(), /*void*/ );
|
||||
m_layers[aLayer].target = aTarget;
|
||||
}
|
||||
|
||||
|
@ -584,8 +584,7 @@ public:
|
|||
*/
|
||||
bool IsTargetDirty( int aTarget ) const
|
||||
{
|
||||
wxASSERT( aTarget < TARGETS_NUMBER );
|
||||
|
||||
wxCHECK( aTarget < TARGETS_NUMBER, false );
|
||||
return m_dirtyTargets[aTarget];
|
||||
}
|
||||
|
||||
|
@ -596,15 +595,14 @@ public:
|
|||
*/
|
||||
inline void MarkTargetDirty( int aTarget )
|
||||
{
|
||||
wxASSERT( aTarget < TARGETS_NUMBER );
|
||||
|
||||
wxCHECK( aTarget < TARGETS_NUMBER, /* void */ );
|
||||
m_dirtyTargets[aTarget] = true;
|
||||
}
|
||||
|
||||
/// Returns true if the layer is cached
|
||||
inline bool IsCached( int aLayer ) const
|
||||
{
|
||||
wxASSERT( aLayer < (int) m_layers.size() );
|
||||
wxCHECK( aLayer < (int) m_layers.size(), false );
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -735,8 +733,7 @@ protected:
|
|||
|
||||
inline void markTargetClean( int aTarget )
|
||||
{
|
||||
wxASSERT( aTarget < TARGETS_NUMBER );
|
||||
|
||||
wxCHECK( aTarget < TARGETS_NUMBER, /* void */ );
|
||||
m_dirtyTargets[aTarget] = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue