Coding policy fixes: remove trailing white space.

This commit is contained in:
Cirilo Bernardo 2015-12-14 16:20:54 -05:00 committed by Wayne Stambaugh
parent 5d429ed977
commit 2128594a85
10 changed files with 40 additions and 40 deletions

View File

@ -109,7 +109,7 @@ void CBBOX::Union( const S3D_VERTEX &aPoint )
m_max.x = glm::max( m_max.x, aPoint.x ); m_max.x = glm::max( m_max.x, aPoint.x );
m_max.y = glm::max( m_max.y, aPoint.y ); m_max.y = glm::max( m_max.y, aPoint.y );
m_max.z = glm::max( m_max.z, aPoint.z ); m_max.z = glm::max( m_max.z, aPoint.z );
} }
} }
@ -117,7 +117,7 @@ void CBBOX::Union( const CBBOX &aBBox )
{ {
if( aBBox.m_initialized == false ) if( aBBox.m_initialized == false )
return; return;
if( !m_initialized ) if( !m_initialized )
{ {
// Initialize the bounding box with the given bounding box // Initialize the bounding box with the given bounding box
@ -159,7 +159,7 @@ void CBBOX::Scale( float aScale )
{ {
if( m_initialized == false ) if( m_initialized == false )
return; return;
S3D_VERTEX scaleV = S3D_VERTEX( aScale, aScale, aScale ); S3D_VERTEX scaleV = S3D_VERTEX( aScale, aScale, aScale );
S3D_VERTEX centerV = GetCenter(); S3D_VERTEX centerV = GetCenter();
@ -168,7 +168,7 @@ void CBBOX::Scale( float aScale )
} }
bool CBBOX::OverlapsBox( const CBBOX &aBBox ) const bool CBBOX::OverlapsBox( const CBBOX &aBBox ) const
{ {
if( aBBox.m_initialized == false ) if( aBBox.m_initialized == false )
return false; return false;
@ -181,7 +181,7 @@ bool CBBOX::OverlapsBox( const CBBOX &aBBox ) const
} }
bool CBBOX::Inside( const S3D_VERTEX &aPoint ) const bool CBBOX::Inside( const S3D_VERTEX &aPoint ) const
{ {
if( m_initialized == false ) if( m_initialized == false )
return false; return false;
@ -192,7 +192,7 @@ bool CBBOX::Inside( const S3D_VERTEX &aPoint ) const
} }
float CBBOX::Volume() const float CBBOX::Volume() const
{ {
if( m_initialized == false ) if( m_initialized == false )
return 0.0f; return 0.0f;
@ -206,7 +206,7 @@ void CBBOX::ApplyTransformation( glm::mat4 aTransformMatrix )
{ {
if( m_initialized == false ) if( m_initialized == false )
return; return;
S3D_VERTEX v1 = S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_min.y, m_min.z, 1.0f ) ); S3D_VERTEX v1 = S3D_VERTEX( aTransformMatrix * glm::vec4( m_min.x, m_min.y, m_min.z, 1.0f ) );
S3D_VERTEX v2 = S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_max.y, m_max.z, 1.0f ) ); S3D_VERTEX v2 = S3D_VERTEX( aTransformMatrix * glm::vec4( m_max.x, m_max.y, m_max.z, 1.0f ) );
@ -237,7 +237,7 @@ void CBBOX::ApplyTransformationAA( glm::mat4 aTransformMatrix )
} }
void CBBOX::GLdebug() const void CBBOX::GLdebug() const
{ {
if( m_initialized == false ) if( m_initialized == false )
return; return;

View File

@ -80,11 +80,11 @@ bool CIMAGE::wrapCoords( int *aXo, int *aYo ) const
default: default:
break; break;
} }
if( (x < 0) || (x >= (int)m_width) || if( (x < 0) || (x >= (int)m_width) ||
(y < 0) || (y >= (int)m_height) ) (y < 0) || (y >= (int)m_height) )
return false; return false;
*aXo = x; *aXo = x;
*aYo = y; *aYo = y;
@ -127,7 +127,7 @@ void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOpe
else else
{ {
if ( (aImgA == NULL) || (aImgB == NULL) ) if ( (aImgA == NULL) || (aImgB == NULL) )
return; return;
} }
switch(aOperation) switch(aOperation)
@ -202,7 +202,7 @@ void CIMAGE::CopyFull( const CIMAGE *aImgA, const CIMAGE *aImgB, E_IMAGE_OP aOpe
m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it]; m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
} }
break; break;
case COPY_BLEND50: case COPY_BLEND50:
for( unsigned int it = 0;it < m_wxh; it++ ) for( unsigned int it = 0;it < m_wxh; it++ )
{ {
@ -253,7 +253,7 @@ static const S_FILTER FILTERS[] = {
7, 7,
255 255
}, },
// Blur // Blur
{ {
{ { 3, 5, 7, 5, 3}, { { 3, 5, 7, 5, 3},
@ -378,7 +378,7 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
#ifdef USE_OPENMP #ifdef USE_OPENMP
#pragma omp parallel for #pragma omp parallel for
#endif /* USE_OPENMP */ #endif /* USE_OPENMP */
for( int iy = 0; iy < (int)m_height; iy++) for( int iy = 0; iy < (int)m_height; iy++)
{ {
for( int ix = 0; ix < (int)m_width; ix++ ) for( int ix = 0; ix < (int)m_width; ix++ )
@ -394,7 +394,7 @@ void CIMAGE::EfxFilter( CIMAGE *aInImg, E_FILTER aFilterType )
v += pixelv * factor; v += pixelv * factor;
} }
} }
v /= filter.div; v /= filter.div;
v += filter.offset; v += filter.offset;
@ -421,7 +421,7 @@ void CIMAGE::SetPixelsFromNormalizedFloat( const float * aNormalizedFloatArray )
void CIMAGE::SaveAsPNG( wxString aFileName ) const void CIMAGE::SaveAsPNG( wxString aFileName ) const
{ {
unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 ); unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
wxImage image( m_width, m_height ); wxImage image( m_width, m_height );
for( unsigned int i = 0; i < m_wxh; i++) for( unsigned int i = 0; i < m_wxh; i++)

View File

@ -99,7 +99,7 @@ public:
* @param aValue value to set the pixel * @param aValue value to set the pixel
*/ */
void Setpixel( int aX, int aY, unsigned char aValue ); void Setpixel( int aX, int aY, unsigned char aValue );
/** /**
* Function Getpixel * Function Getpixel
* get the pixel value from pixel position, position is clamped in accord with the * get the pixel value from pixel position, position is clamped in accord with the

View File

@ -137,8 +137,8 @@ public:
* Function Cmp * Function Cmp
* Compare if this is the same sheet path as aSheetPathToTest * Compare if this is the same sheet path as aSheetPathToTest
* @param aSheetPathToTest = sheet path to compare * @param aSheetPathToTest = sheet path to compare
* @return 1 if this sheet path has more sheets than aSheetPathToTest, * @return 1 if this sheet path has more sheets than aSheetPathToTest,
* -1 if this sheet path has fewer sheets than aSheetPathToTest, * -1 if this sheet path has fewer sheets than aSheetPathToTest,
* or 0 if same * or 0 if same
*/ */
int Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const; int Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const;

View File

@ -688,7 +688,7 @@ void DIALOG_PLOT::applyPlotSettings()
// If someone enables more copper layers they will be selected by default. // If someone enables more copper layers they will be selected by default.
selectedLayers = selectedLayers | disabledCopperLayers; selectedLayers = selectedLayers | disabledCopperLayers;
tempOptions.SetLayerSelection( selectedLayers ); tempOptions.SetLayerSelection( selectedLayers );
tempOptions.SetNegative( m_plotPSNegativeOpt->GetValue() ); tempOptions.SetNegative( m_plotPSNegativeOpt->GetValue() );
tempOptions.SetA4Output( m_forcePSA4OutputOpt->GetValue() ); tempOptions.SetA4Output( m_forcePSA4OutputOpt->GetValue() );
@ -786,7 +786,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq ) for( LSEQ seq = m_plotOpts.GetLayerSelection().UIOrder(); seq; ++seq )
{ {
LAYER_ID layer = *seq; LAYER_ID layer = *seq;
// All copper layers that are disabled are actually selected // All copper layers that are disabled are actually selected
// This is due to wonkyness in automatically selecting copper layers // This is due to wonkyness in automatically selecting copper layers
// for plotting when adding more than two layers to a board. // for plotting when adding more than two layers to a board.
@ -795,7 +795,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
// This skips a copper layer if it is actually disabled on the board. // This skips a copper layer if it is actually disabled on the board.
if( ( LSET::AllCuMask() & ~m_board->GetEnabledLayers() )[layer] ) if( ( LSET::AllCuMask() & ~m_board->GetEnabledLayers() )[layer] )
continue; continue;
// Pick the basename from the board file // Pick the basename from the board file
wxFileName fn( boardFilename ); wxFileName fn( boardFilename );

View File

@ -22,7 +22,7 @@
#include "time_limit.h" #include "time_limit.h"
TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) : TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) :
m_limitMs( aMilliseconds ) m_limitMs( aMilliseconds )
{ {
Restart(); Restart();

View File

@ -269,7 +269,7 @@ int POINT_EDITOR::OnSelectionChange( const TOOL_EVENT& aEvent )
{ {
break; break;
} }
if ( !modified ) if ( !modified )
updateEditedPoint( *evt ); updateEditedPoint( *evt );

View File

@ -60,7 +60,7 @@ double GetPointToLineSegmentDistance( int x, int y, int xi, int yi, int xf, int
* if b > DBL_MAX/10, assume vertical line at x = a * if b > DBL_MAX/10, assume vertical line at x = a
* returns closest point on line in xpp, ypp * returns closest point on line in xpp, ypp
*/ */
double GetPointToLineDistance( double a, double b, int x, int y, double GetPointToLineDistance( double a, double b, int x, int y,
double * xp=NULL, double * yp=NULL ); double * xp=NULL, double * yp=NULL );
inline double Distance( double x1, double y1, double x2, double y2 ) inline double Distance( double x1, double y1, double x2, double y2 )

View File

@ -1,4 +1,4 @@
/* /*
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
* http://code.google.com/p/poly2tri/ * http://code.google.com/p/poly2tri/
* *

View File

@ -1,4 +1,4 @@
/* /*
* Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
* http://code.google.com/p/poly2tri/ * http://code.google.com/p/poly2tri/
* *
@ -28,7 +28,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef CDT_H #ifndef CDT_H
#define CDT_H #define CDT_H
@ -37,11 +37,11 @@
#include "sweep.h" #include "sweep.h"
/** /**
* *
* @author Mason Green <mason.green@gmail.com> * @author Mason Green <mason.green@gmail.com>
* *
*/ */
namespace p2t { namespace p2t {
class CDT class CDT
@ -50,40 +50,40 @@ public:
/** /**
* Constructor - add polyline with non repeating points * Constructor - add polyline with non repeating points
* *
* @param polyline * @param polyline
*/ */
CDT(std::vector<Point*> polyline); CDT(std::vector<Point*> polyline);
/** /**
* Destructor - clean up memory * Destructor - clean up memory
*/ */
~CDT(); ~CDT();
/** /**
* Add a hole * Add a hole
* *
* @param polyline * @param polyline
*/ */
void AddHole(std::vector<Point*> polyline); void AddHole(std::vector<Point*> polyline);
/** /**
* Add a steiner point * Add a steiner point
* *
* @param point * @param point
*/ */
void AddPoint(Point* point); void AddPoint(Point* point);
/** /**
* Triangulate - do this AFTER you've added the polyline, holes, and Steiner points * Triangulate - do this AFTER you've added the polyline, holes, and Steiner points
*/ */
void Triangulate(); void Triangulate();
/** /**
* Get CDT triangles * Get CDT triangles
*/ */
std::vector<Triangle*> GetTriangles(); std::vector<Triangle*> GetTriangles();
/** /**
* Get triangle map * Get triangle map
*/ */
@ -94,7 +94,7 @@ public:
/** /**
* Internals * Internals
*/ */
SweepContext* sweep_context_; SweepContext* sweep_context_;
Sweep* sweep_; Sweep* sweep_;