← Back to team overview

kicad-developers team mailing list archive

PATCH: remove some trailing whitespace

 

I was inspired to check sources for trailing white space and found a few -
in fact
very few for a project the size of kicad. Naturally all the auto-generated
code
was ignored.

This patch removes trailing white space from the following files:

pcbnew/router/time_limit.cpp
pcbnew/tools/point_editor.cpp
pcbnew/dialogs/dialog_plot.cpp
3d-viewer/CImage.cpp
3d-viewer/CBBox.cpp
eeschema/sch_sheet_path.h
3d-viewer/CImage.h
polygon/math_for_graphics.h
polygon/poly2tri/sweep/cdt.h
polygon/poly2tri/poly2tri.h

Note: the following also have tabs (not replaced):
pcbnew/router/time_limit.cpp
pcbnew/tools/point_editor.cpp


- Cirilo
=== modified file '3d-viewer/CBBox.cpp'
--- 3d-viewer/CBBox.cpp	2015-03-28 11:33:56 +0000
+++ 3d-viewer/CBBox.cpp	2015-12-10 00:53:35 +0000
@@ -109,7 +109,7 @@
         m_max.x =  glm::max( m_max.x, aPoint.x );
         m_max.y =  glm::max( m_max.y, aPoint.y );
         m_max.z =  glm::max( m_max.z, aPoint.z );
-    }   
+    }
 }
 
 
@@ -117,7 +117,7 @@
 {
     if( aBBox.m_initialized == false )
         return;
-    
+
     if( !m_initialized )
     {
         // Initialize the bounding box with the given bounding box
@@ -159,7 +159,7 @@
 {
     if( m_initialized == false )
         return;
-    
+
     S3D_VERTEX scaleV  = S3D_VERTEX( aScale, aScale, aScale );
     S3D_VERTEX centerV = GetCenter();
 
@@ -168,7 +168,7 @@
 }
 
 
-bool CBBOX::OverlapsBox( const CBBOX &aBBox ) const 
+bool CBBOX::OverlapsBox( const CBBOX &aBBox ) const
 {
     if( aBBox.m_initialized == false )
         return false;
@@ -181,7 +181,7 @@
 }
 
 
-bool CBBOX::Inside( const S3D_VERTEX &aPoint ) const 
+bool CBBOX::Inside( const S3D_VERTEX &aPoint ) const
 {
     if( m_initialized == false )
         return false;
@@ -192,7 +192,7 @@
 }
 
 
-float CBBOX::Volume() const 
+float CBBOX::Volume() const
 {
     if( m_initialized == false )
         return 0.0f;
@@ -206,7 +206,7 @@
 {
     if( m_initialized == false )
         return;
-    
+
     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 ) );
 
@@ -237,7 +237,7 @@
 }
 
 
-void CBBOX::GLdebug() const 
+void CBBOX::GLdebug() const
 {
     if( m_initialized == false )
         return;

=== modified file '3d-viewer/CImage.cpp'
--- 3d-viewer/CImage.cpp	2015-03-28 11:33:56 +0000
+++ 3d-viewer/CImage.cpp	2015-12-10 00:53:35 +0000
@@ -80,11 +80,11 @@
     default:
         break;
     }
-    
+
     if( (x < 0) || (x >= (int)m_width) ||
         (y < 0) || (y >= (int)m_height) )
         return false;
-    
+
     *aXo = x;
     *aYo = y;
 
@@ -127,7 +127,7 @@
     else
     {
         if ( (aImgA == NULL) || (aImgB == NULL) )
-            return; 
+            return;
     }
 
     switch(aOperation)
@@ -202,7 +202,7 @@
             m_pixels[it] = aImgA->m_pixels[it] ^ aImgB->m_pixels[it];
         }
     break;
-    
+
     case COPY_BLEND50:
         for( unsigned int it = 0;it < m_wxh; it++ )
         {
@@ -253,7 +253,7 @@
         7,
         255
     },
-    
+
     // Blur
     {
     {   { 3,  5,  7,  5,  3},
@@ -378,7 +378,7 @@
     #ifdef USE_OPENMP
     #pragma omp parallel for
     #endif /* USE_OPENMP */
-    
+
     for( int iy = 0; iy < (int)m_height; iy++)
     {
         for( int ix = 0; ix < (int)m_width; ix++ )
@@ -394,7 +394,7 @@
                     v += pixelv * factor;
                 }
             }
-            
+
             v /= filter.div;
 
             v += filter.offset;
@@ -421,7 +421,7 @@
 void CIMAGE::SaveAsPNG( wxString aFileName ) const
 {
     unsigned char* pixelbuffer = (unsigned char*) malloc( m_wxh * 3 );
-   
+
     wxImage image( m_width, m_height );
 
     for( unsigned int i = 0; i < m_wxh; i++)

=== modified file '3d-viewer/CImage.h'
--- 3d-viewer/CImage.h	2015-03-28 11:33:56 +0000
+++ 3d-viewer/CImage.h	2015-12-10 00:53:35 +0000
@@ -99,7 +99,7 @@
      * @param aValue value to set the pixel
      */
     void Setpixel( int aX, int aY, unsigned char aValue );
-    
+
     /**
      * Function Getpixel
      * get the pixel value from pixel position, position is clamped in accord with the

=== modified file 'eeschema/sch_sheet_path.h'
--- eeschema/sch_sheet_path.h	2015-08-31 11:13:26 +0000
+++ eeschema/sch_sheet_path.h	2015-12-10 00:53:35 +0000
@@ -137,8 +137,8 @@
      * Function Cmp
      * Compare if this is the same sheet path as aSheetPathToTest
      * @param aSheetPathToTest = sheet path to compare
-     * @return 1 if this sheet path has more sheets than aSheetPathToTest, 
-     *   -1 if this sheet path has fewer sheets than aSheetPathToTest, 
+     * @return 1 if this sheet path has more sheets than aSheetPathToTest,
+     *   -1 if this sheet path has fewer sheets than aSheetPathToTest,
      *   or 0 if same
      */
     int Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const;

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

=== modified file 'pcbnew/router/time_limit.cpp'
--- pcbnew/router/time_limit.cpp	2014-05-16 11:37:31 +0000
+++ pcbnew/router/time_limit.cpp	2015-12-10 00:53:35 +0000
@@ -22,7 +22,7 @@
 
 #include "time_limit.h"
 
-TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) : 
+TIME_LIMIT::TIME_LIMIT( int aMilliseconds ) :
 	m_limitMs( aMilliseconds )
 {
     Restart();

=== modified file 'pcbnew/tools/point_editor.cpp'
--- pcbnew/tools/point_editor.cpp	2015-08-15 13:28:48 +0000
+++ pcbnew/tools/point_editor.cpp	2015-12-10 00:53:35 +0000
@@ -269,7 +269,7 @@
             {
                 break;
             }
-	
+
             if ( !modified )
                 updateEditedPoint( *evt );
 

=== modified file 'polygon/math_for_graphics.h'
--- polygon/math_for_graphics.h	2013-05-04 11:57:09 +0000
+++ polygon/math_for_graphics.h	2015-12-10 00:53:35 +0000
@@ -60,7 +60,7 @@
  * if b > DBL_MAX/10, assume vertical line at x = a
  * 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 );
 
 inline double Distance( double x1, double y1, double x2, double y2 )

=== modified file 'polygon/poly2tri/poly2tri.h'
--- polygon/poly2tri/poly2tri.h	2015-07-14 20:23:13 +0000
+++ polygon/poly2tri/poly2tri.h	2015-12-10 00:53:35 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
  * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors
  * http://code.google.com/p/poly2tri/
  *

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


Follow ups