Commit e6a10faa authored by Maciej Suminski's avatar Maciej Suminski
Browse files

FIxed a few clang warnings.

parent 5d8f7ba0
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -242,7 +242,6 @@ set( COMMON_SRCS
    geometry/seg.cpp
    geometry/shape_line_chain.cpp
    geometry/shape_collisions.cpp
    geometry/shape_index.cpp
    )
add_library( common STATIC ${COMMON_SRCS} )
add_dependencies( common lib-dependencies )
+4 −4
Original line number Diff line number Diff line
@@ -157,10 +157,10 @@ void GAL::DrawGrid()
        assert( gridEndY >= gridStartY );

        // Correct the index, else some lines are not correctly painted
        gridStartX -= abs( gridOrigin.x / gridSize.x ) + 1;
        gridStartY -= abs( gridOrigin.y / gridSize.y ) + 1;
        gridEndX += abs( gridOrigin.x / gridSize.x ) + 1;
        gridEndY += abs( gridOrigin.y / gridSize.y ) + 1;
        gridStartX -= std::abs( gridOrigin.x / gridSize.x ) + 1;
        gridStartY -= std::abs( gridOrigin.y / gridSize.y ) + 1;
        gridEndX += std::abs( gridOrigin.x / gridSize.x ) + 1;
        gridEndY += std::abs( gridOrigin.y / gridSize.y ) + 1;

        // Draw the grid behind all other layers
        SetLayerDepth( depthRange.y * 0.75 );
+0 −3
Original line number Diff line number Diff line
@@ -137,12 +137,9 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB,
                            bool aNeedMTV, VECTOR2I& aMTV )
{
    bool found = false;
    VECTOR2I::extended_type clSq = (VECTOR2I::extended_type) aClearance * aClearance;


    for( int s = 0; s < aB.SegmentCount(); s++ )
    {

        if( aA.Collide( aB.CSegment( s ), aClearance ) )
        {
            found = true;

common/geometry/shape_index.cpp

deleted100644 → 0
+0 −32
Original line number Diff line number Diff line
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2013 CERN
 * @author Jacobo Aragunde Pérez
 * @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

#include <geometry/shape_index.h>

template <>
const SHAPE* shapeFunctor( SHAPE* aItem )
{
    return aItem;
}
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
                             ( (double) aEvent.GetWheelRotation() * wheelPanSpeed );
        double   scrollSpeed;

        if( abs( scrollVec.x ) > abs( scrollVec.y ) )
        if( std::abs( scrollVec.x ) > std::abs( scrollVec.y ) )
            scrollSpeed = scrollVec.x;
        else
            scrollSpeed = scrollVec.y;
Loading