Removed a few warnings.

This commit is contained in:
Bernhard Stegmaier 2014-06-05 12:40:26 +02:00 committed by Maciej Suminski
parent afbe21fe70
commit 60a86853ec
10 changed files with 21 additions and 16 deletions

View File

@ -35,6 +35,10 @@
using namespace KIGFX;
const float CAIRO_GAL::LAYER_ALPHA = 0.8;
CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
wxEvtHandler* aPaintListener, const wxString& aName ) :
wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName )

View File

@ -31,6 +31,10 @@
using namespace KIGFX;
const double GAL::METRIC_UNIT_LENGTH = 1e9;
GAL::GAL() :
strokeFont( this )
{

View File

@ -893,7 +893,7 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer )
group = m_gal->BeginGroup();
aItem->setGroup( aLayer, group );
if( !m_painter->Draw( static_cast<EDA_ITEM*>( aItem ), aLayer ) );
if( !m_painter->Draw( static_cast<EDA_ITEM*>( aItem ), aLayer ) )
aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method
m_gal->EndGroup();

View File

@ -389,7 +389,7 @@ private:
static const cairo_format_t GAL_FORMAT = CAIRO_FORMAT_RGB24;
///> Opacity of a single layer
static const float LAYER_ALPHA = 0.8;
static const float LAYER_ALPHA;
};
} // namespace KIGFX

View File

@ -820,7 +820,7 @@ public:
/// Depth level on which the grid is drawn
static const int GRID_DEPTH = 1024;
static const double METRIC_UNIT_LENGTH = 1e9;
static const double METRIC_UNIT_LENGTH;
protected:
std::stack<double> depthStack; ///< Stored depth values

View File

@ -331,13 +331,15 @@ private:
if( mag < 0.0 )
mag += 360.0;
m_dir = (Directions)( ( mag + 22.5 ) / 45.0 );
int dir = ( mag + 22.5 ) / 45.0;
if( m_dir >= 8 )
m_dir = (Directions)( m_dir - 8 );
if( dir >= 8 )
dir = dir - 8;
if( m_dir < 0 )
m_dir = (Directions)( m_dir + 8 );
if( dir < 0 )
dir = dir + 8;
m_dir = (Directions) dir;
return;

View File

@ -626,19 +626,19 @@ void PNS_LINE::DragSegment ( const VECTOR2I& aP, int aIndex, int aSnappingThresh
OPT_VECTOR2I ip;
if( ip = s1.Intersect( s_next ) )
if( (ip = s1.Intersect( s_next )) )
{
np.Append ( s1.A );
np.Append ( *ip );
np.Append ( s_next.B );
}
else if( ip = s3.Intersect( s_prev ) )
else if( (ip = s3.Intersect( s_prev )) )
{
np.Append ( s_prev.A );
np.Append ( *ip );
np.Append ( s3.B );
}
else if( ip = s1.Intersect( s3 ) )
else if( (ip = s1.Intersect( s3 )) )
{
np.Append( s_prev.A );
np.Append( *ip );

View File

@ -560,7 +560,6 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingVia (PNS_ITEM* aCurrent, PNS_VIA*
{
int clearance = m_currentNode->GetClearance( aCurrent, aObstacleVia ) ;
LINE_PAIR_VEC draggedLines;
VECTOR2I p0( aObstacleVia->Pos() );
bool colLine = false, colVia = false;
PNS_LINE *currentLine = NULL;
VECTOR2I mtvLine, mtvVia, mtv, mtvSolid;

View File

@ -126,8 +126,6 @@ private:
PNS_NODE* m_root;
PNS_NODE* m_currentNode;
PNS_LINE* m_currentHead;
PNS_LINE* m_collidingLine;
OPT_LINE m_newHead;

View File

@ -77,8 +77,6 @@ private:
PNS_ITEM* m_endItem;
VECTOR2I m_endSnapPoint;
CONTEXT_MENU* m_menu;
///> Flag marking that the router's world needs syncing.
bool m_needsSync;
};