Commit 5729ee7e authored by Camille's avatar Camille Committed by Wayne Stambaugh

Compile warning fixes and minor code policy fixes.

parent 71e5fb13
...@@ -192,7 +192,7 @@ int VRML1_MODEL_PARSER::readMaterial() ...@@ -192,7 +192,7 @@ int VRML1_MODEL_PARSER::readMaterial()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
return 0; return 0;
} }
...@@ -240,7 +240,7 @@ int VRML1_MODEL_PARSER::readCoordinate3() ...@@ -240,7 +240,7 @@ int VRML1_MODEL_PARSER::readCoordinate3()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
return 0; return 0;
} }
...@@ -268,7 +268,7 @@ int VRML1_MODEL_PARSER::readIndexedFaceSet() ...@@ -268,7 +268,7 @@ int VRML1_MODEL_PARSER::readIndexedFaceSet()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
return 0; return 0;
} }
......
...@@ -145,7 +145,7 @@ int VRML2_MODEL_PARSER::read_Transform() ...@@ -145,7 +145,7 @@ int VRML2_MODEL_PARSER::read_Transform()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " } Exit Transform\n" ) ); // DBG( printf( " } Exit Transform\n" ) );
break; break;
...@@ -265,7 +265,7 @@ int VRML2_MODEL_PARSER::read_DEF() ...@@ -265,7 +265,7 @@ int VRML2_MODEL_PARSER::read_DEF()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " } Exit DEF\n") ); // DBG( printf( " } Exit DEF\n") );
return 0; return 0;
...@@ -321,7 +321,7 @@ int VRML2_MODEL_PARSER::read_Shape() ...@@ -321,7 +321,7 @@ int VRML2_MODEL_PARSER::read_Shape()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " } Exit Shape\n") ); // DBG( printf( " } Exit Shape\n") );
return 0; return 0;
...@@ -368,7 +368,7 @@ int VRML2_MODEL_PARSER::read_Appearance() ...@@ -368,7 +368,7 @@ int VRML2_MODEL_PARSER::read_Appearance()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
return 0; return 0;
} }
...@@ -473,7 +473,7 @@ int VRML2_MODEL_PARSER::read_Material() ...@@ -473,7 +473,7 @@ int VRML2_MODEL_PARSER::read_Material()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
return 0; return 0;
} }
...@@ -566,7 +566,7 @@ int VRML2_MODEL_PARSER::read_IndexedFaceSet() ...@@ -566,7 +566,7 @@ int VRML2_MODEL_PARSER::read_IndexedFaceSet()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " } Exit IndexedFaceSet\n") ); // DBG( printf( " } Exit IndexedFaceSet\n") );
return 0; return 0;
...@@ -749,7 +749,7 @@ int VRML2_MODEL_PARSER::read_Color() ...@@ -749,7 +749,7 @@ int VRML2_MODEL_PARSER::read_Color()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " m_DiffuseColor.size: %ld\n", m_model->m_Materials->m_DiffuseColor.size() ) ); // DBG( printf( " m_DiffuseColor.size: %ld\n", m_model->m_Materials->m_DiffuseColor.size() ) );
return 0; return 0;
...@@ -779,7 +779,7 @@ int VRML2_MODEL_PARSER::read_Normal() ...@@ -779,7 +779,7 @@ int VRML2_MODEL_PARSER::read_Normal()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " m_PerFaceNormalsNormalized.size: %lu\n", m_model->m_PerFaceNormalsNormalized.size() ) ); // DBG( printf( " m_PerFaceNormalsNormalized.size: %lu\n", m_model->m_PerFaceNormalsNormalized.size() ) );
return 0; return 0;
...@@ -817,7 +817,7 @@ int VRML2_MODEL_PARSER::read_Coordinate() ...@@ -817,7 +817,7 @@ int VRML2_MODEL_PARSER::read_Coordinate()
continue; continue;
} }
if( ( *text == '}' ) ) if( *text == '}' )
{ {
// DBG( printf( " m_Point.size: %lu\n", m_model->m_Point.size() ) ); // DBG( printf( " m_Point.size: %lu\n", m_model->m_Point.size() ) );
return 0; return 0;
......
...@@ -384,7 +384,9 @@ bool X3D_MODEL_PARSER::parseDoubleTriplet( const wxString& aData, ...@@ -384,7 +384,9 @@ bool X3D_MODEL_PARSER::parseDoubleTriplet( const wxString& aData,
{ {
wxStringTokenizer tokens( aData ); wxStringTokenizer tokens( aData );
double x, y, z; double x = 0;
double y = 0;
double z = 0;
bool ret = tokens.GetNextToken().ToDouble( &x ) bool ret = tokens.GetNextToken().ToDouble( &x )
&& tokens.GetNextToken().ToDouble( &y ) && tokens.GetNextToken().ToDouble( &y )
......
...@@ -250,7 +250,7 @@ struct KIFACE ...@@ -250,7 +250,7 @@ struct KIFACE
*/ */
class KIWAY : public wxEvtHandler class KIWAY : public wxEvtHandler
{ {
friend class PGM_SINGLE_TOP; // can use set_kiface() friend struct PGM_SINGLE_TOP; // can use set_kiface()
public: public:
/// Known KIFACE implementations /// Known KIFACE implementations
......
...@@ -75,7 +75,7 @@ namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp ...@@ -75,7 +75,7 @@ namespace PCB { struct IFACE; } // KIFACE_I is in pcbnew.cpp
*/ */
class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME class PCB_EDIT_FRAME : public PCB_BASE_EDIT_FRAME
{ {
friend class PCB::IFACE; friend struct PCB::IFACE;
friend class PCB_LAYER_WIDGET; friend class PCB_LAYER_WIDGET;
void updateTraceWidthSelectBox(); void updateTraceWidthSelectBox();
......
...@@ -65,7 +65,7 @@ public: ...@@ -65,7 +65,7 @@ public:
ANG_UNDEFINED = 0x20 ANG_UNDEFINED = 0x20
}; };
DIRECTION_45( Directions aDir = UNDEFINED ) : m_dir( aDir ) {}; DIRECTION_45( Directions aDir = UNDEFINED ) : m_dir( aDir ) {}
/** /**
* Constructor * Constructor
......
...@@ -313,11 +313,11 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSegment( PNS_LINE* aCurrent, PNS_S ...@@ -313,11 +313,11 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSegment( PNS_LINE* aCurrent, PNS_S
} }
#ifdef DEBUG #ifdef DEBUG
m_logger.NewGroup ("on-colliding-segment", m_iter); m_logger.NewGroup( "on-colliding-segment", m_iter );
m_logger.Log ( aObstacleSeg, 0, "obstacle-segment"); m_logger.Log( aObstacleSeg, 0, "obstacle-segment" );
m_logger.Log ( aCurrent, 1, "current-line"); m_logger.Log( aCurrent, 1, "current-line" );
m_logger.Log ( obstacleLine, 2, "obstacle-line"); m_logger.Log( obstacleLine, 2, "obstacle-line" );
m_logger.Log ( shovedLine, 3, "shoved-line"); m_logger.Log( shovedLine, 3, "shoved-line" );
#endif #endif
return rv; return rv;
...@@ -365,7 +365,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSolid( PNS_LINE* aCurrent, PNS_SOL ...@@ -365,7 +365,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSolid( PNS_LINE* aCurrent, PNS_SOL
{ {
PNS_VIA vh = aCurrent->Via(); PNS_VIA vh = aCurrent->Via();
PNS_VIA* via = NULL; PNS_VIA* via = NULL;
PNS_JOINT* jtStart = m_currentNode->FindJoint ( vh.Pos(), aCurrent ); PNS_JOINT* jtStart = m_currentNode->FindJoint( vh.Pos(), aCurrent );
if( !jtStart ) if( !jtStart )
return SH_INCOMPLETE; return SH_INCOMPLETE;
...@@ -417,7 +417,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSolid( PNS_LINE* aCurrent, PNS_SOL ...@@ -417,7 +417,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onCollidingSolid( PNS_LINE* aCurrent, PNS_SOL
} }
m_currentNode->Replace( aCurrent, walkaroundLine ); m_currentNode->Replace( aCurrent, walkaroundLine );
walkaroundLine->SetRank ( nextRank ); walkaroundLine->SetRank( nextRank );
#ifdef DEBUG #ifdef DEBUG
m_logger.NewGroup( "on-colliding-solid", m_iter ); m_logger.NewGroup( "on-colliding-solid", m_iter );
...@@ -523,8 +523,8 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForc ...@@ -523,8 +523,8 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::pushVia( PNS_VIA* aVia, const VECTOR2I& aForc
pushedVia->SetRank( aCurrentRank - 1 ); pushedVia->SetRank( aCurrentRank - 1 );
#ifdef DEBUG #ifdef DEBUG
m_logger.Log ( aVia, 0, "obstacle-via"); m_logger.Log( aVia, 0, "obstacle-via" );
m_logger.Log ( pushedVia, 1, "pushed-via"); m_logger.Log( pushedVia, 1, "pushed-via" );
#endif #endif
BOOST_FOREACH( LINE_PAIR lp, draggedLines ) BOOST_FOREACH( LINE_PAIR lp, draggedLines )
...@@ -628,7 +628,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PN ...@@ -628,7 +628,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PN
head->AppendVia( *aObstacleVia ); head->AppendVia( *aObstacleVia );
SHOVE_STATUS st = processSingleLine ( head, cur, shoved ); SHOVE_STATUS st = processSingleLine( head, cur, shoved );
if( st != SH_OK ) if( st != SH_OK )
{ {
...@@ -665,7 +665,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PN ...@@ -665,7 +665,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PN
if( st != SH_OK ) if( st != SH_OK )
return st; return st;
cur->SetShape ( shoved->CLine() ); cur->SetShape( shoved->CLine() );
} }
if( aCurrent->EndsWithVia() ) if( aCurrent->EndsWithVia() )
...@@ -678,7 +678,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PN ...@@ -678,7 +678,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::onReverseCollidingVia( PNS_LINE* aCurrent, PN
m_logger.Log( shoved, 3, "shoved-line" ); m_logger.Log( shoved, 3, "shoved-line" );
#endif #endif
int currentRank = aCurrent->Rank(); int currentRank = aCurrent->Rank();
m_currentNode->Replace ( aCurrent, shoved ); m_currentNode->Replace( aCurrent, shoved );
pushLine( shoved ); pushLine( shoved );
shoved->SetRank( currentRank ); shoved->SetRank( currentRank );
...@@ -691,7 +691,7 @@ void PNS_SHOVE::unwindStack( PNS_SEGMENT *aSeg ) ...@@ -691,7 +691,7 @@ void PNS_SHOVE::unwindStack( PNS_SEGMENT *aSeg )
{ {
for( std::vector<PNS_LINE*>::iterator i = m_lineStack.begin(); i != m_lineStack.end(); ) for( std::vector<PNS_LINE*>::iterator i = m_lineStack.begin(); i != m_lineStack.end(); )
{ {
if( (*i)->ContainsSegment ( aSeg ) ) if( (*i)->ContainsSegment( aSeg ) )
i = m_lineStack.erase( i ); i = m_lineStack.erase( i );
else else
i++; i++;
...@@ -756,7 +756,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter ) ...@@ -756,7 +756,7 @@ PNS_SHOVE::SHOVE_STATUS PNS_SHOVE::shoveIteration( int aIter )
{ {
PNS_LINE* currentLine = m_lineStack.back(); PNS_LINE* currentLine = m_lineStack.back();
PNS_NODE::OPT_OBSTACLE nearest; PNS_NODE::OPT_OBSTACLE nearest;
SHOVE_STATUS st; SHOVE_STATUS st = SH_NULL;
PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID, PNS_ITEM::VIA, PNS_ITEM::SEGMENT }; PNS_ITEM::PnsKind search_order[] = { PNS_ITEM::SOLID, PNS_ITEM::VIA, PNS_ITEM::SEGMENT };
...@@ -1028,7 +1028,7 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead ) ...@@ -1028,7 +1028,7 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead )
std::reverse( m_optimizerQueue.begin(), m_optimizerQueue.end() ); std::reverse( m_optimizerQueue.begin(), m_optimizerQueue.end() );
for( std::vector<PNS_LINE*>::iterator i = m_optimizerQueue.begin(); for( std::vector<PNS_LINE*>::iterator i = m_optimizerQueue.begin();
i != m_optimizerQueue.end(); ++i) i != m_optimizerQueue.end(); ++i )
{ {
PNS_LINE* line = *i; PNS_LINE* line = *i;
...@@ -1057,8 +1057,6 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead ) ...@@ -1057,8 +1057,6 @@ void PNS_SHOVE::runOptimizer( PNS_NODE* aNode, PNS_LINE* aHead )
} }
} }
} }
} }
...@@ -1120,5 +1118,5 @@ const PNS_LINE PNS_SHOVE::NewHead() const ...@@ -1120,5 +1118,5 @@ const PNS_LINE PNS_SHOVE::NewHead() const
void PNS_SHOVE::SetInitialLine( PNS_LINE* aInitial ) void PNS_SHOVE::SetInitialLine( PNS_LINE* aInitial )
{ {
m_root = m_root->Branch(); m_root = m_root->Branch();
m_root->Remove ( aInitial ); m_root->Remove( aInitial );
} }
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <boost/function.hpp> #include <boost/function.hpp>
#include <core/typeinfo.h> #include <core/typeinfo.h>
class SELECTION; struct SELECTION;
///> Functor type that checks a specific condition for selected items. ///> Functor type that checks a specific condition for selected items.
typedef boost::function<bool (const SELECTION&)> SELECTION_CONDITION; typedef boost::function<bool (const SELECTION&)> SELECTION_CONDITION;
......
...@@ -848,7 +848,7 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes, bool aHolesOnly ) ...@@ -848,7 +848,7 @@ bool VRML_LAYER::Tesselate( VRML_LAYER* holes, bool aHolesOnly )
std::ostringstream ostr; std::ostringstream ostr;
ostr << "Tesselate():FAILED: " << holes->GetError(); ostr << "Tesselate():FAILED: " << holes->GetError();
error = ostr.str(); error = ostr.str();
return NULL; return false;
} }
if( Fault ) if( Fault )
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
#define M_PI4 ( M_PI / 4.0 ) #define M_PI4 ( M_PI / 4.0 )
#endif #endif
struct GLUtesselator;
struct VERTEX_3D struct VERTEX_3D
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment