Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
e6a10faa
Commit
e6a10faa
authored
Mar 09, 2015
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIxed a few clang warnings.
parent
5d8f7ba0
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
20 additions
and
82 deletions
+20
-82
CMakeLists.txt
common/CMakeLists.txt
+0
-1
graphics_abstraction_layer.cpp
common/gal/graphics_abstraction_layer.cpp
+4
-4
shape_collisions.cpp
common/geometry/shape_collisions.cpp
+0
-3
shape_index.cpp
common/geometry/shape_index.cpp
+0
-32
wx_view_controls.cpp
common/view/wx_view_controls.cpp
+1
-1
seg.h
include/geometry/seg.h
+1
-1
shape_index.h
include/geometry/shape_index.h
+0
-9
dialog_create_array.cpp
pcbnew/dialogs/dialog_create_array.cpp
+2
-2
length_tuner_tool.cpp
pcbnew/router/length_tuner_tool.cpp
+5
-6
pns_diff_pair.cpp
pcbnew/router/pns_diff_pair.cpp
+1
-1
pns_line_placer.h
pcbnew/router/pns_line_placer.h
+0
-14
pns_router.cpp
pcbnew/router/pns_router.cpp
+4
-5
pns_shove.h
pcbnew/router/pns_shove.h
+0
-1
pns_tune_status_popup.cpp
pcbnew/router/pns_tune_status_popup.cpp
+1
-1
pns_tune_status_popup.h
pcbnew/router/pns_tune_status_popup.h
+1
-1
No files found.
common/CMakeLists.txt
View file @
e6a10faa
...
@@ -242,7 +242,6 @@ set( COMMON_SRCS
...
@@ -242,7 +242,6 @@ set( COMMON_SRCS
geometry/seg.cpp
geometry/seg.cpp
geometry/shape_line_chain.cpp
geometry/shape_line_chain.cpp
geometry/shape_collisions.cpp
geometry/shape_collisions.cpp
geometry/shape_index.cpp
)
)
add_library
(
common STATIC
${
COMMON_SRCS
}
)
add_library
(
common STATIC
${
COMMON_SRCS
}
)
add_dependencies
(
common lib-dependencies
)
add_dependencies
(
common lib-dependencies
)
...
...
common/gal/graphics_abstraction_layer.cpp
View file @
e6a10faa
...
@@ -157,10 +157,10 @@ void GAL::DrawGrid()
...
@@ -157,10 +157,10 @@ void GAL::DrawGrid()
assert
(
gridEndY
>=
gridStartY
);
assert
(
gridEndY
>=
gridStartY
);
// Correct the index, else some lines are not correctly painted
// Correct the index, else some lines are not correctly painted
gridStartX
-=
abs
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridStartX
-=
std
::
abs
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridStartY
-=
abs
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
gridStartY
-=
std
::
abs
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
gridEndX
+=
abs
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridEndX
+=
std
::
abs
(
gridOrigin
.
x
/
gridSize
.
x
)
+
1
;
gridEndY
+=
abs
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
gridEndY
+=
std
::
abs
(
gridOrigin
.
y
/
gridSize
.
y
)
+
1
;
// Draw the grid behind all other layers
// Draw the grid behind all other layers
SetLayerDepth
(
depthRange
.
y
*
0.75
);
SetLayerDepth
(
depthRange
.
y
*
0.75
);
...
...
common/geometry/shape_collisions.cpp
View file @
e6a10faa
...
@@ -137,12 +137,9 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB,
...
@@ -137,12 +137,9 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB,
bool
aNeedMTV
,
VECTOR2I
&
aMTV
)
bool
aNeedMTV
,
VECTOR2I
&
aMTV
)
{
{
bool
found
=
false
;
bool
found
=
false
;
VECTOR2I
::
extended_type
clSq
=
(
VECTOR2I
::
extended_type
)
aClearance
*
aClearance
;
for
(
int
s
=
0
;
s
<
aB
.
SegmentCount
();
s
++
)
for
(
int
s
=
0
;
s
<
aB
.
SegmentCount
();
s
++
)
{
{
if
(
aA
.
Collide
(
aB
.
CSegment
(
s
),
aClearance
)
)
if
(
aA
.
Collide
(
aB
.
CSegment
(
s
),
aClearance
)
)
{
{
found
=
true
;
found
=
true
;
...
...
common/geometry/shape_index.cpp
deleted
100644 → 0
View file @
5d8f7ba0
/*
* 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
;
}
common/view/wx_view_controls.cpp
View file @
e6a10faa
...
@@ -138,7 +138,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
...
@@ -138,7 +138,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent )
(
(
double
)
aEvent
.
GetWheelRotation
()
*
wheelPanSpeed
);
(
(
double
)
aEvent
.
GetWheelRotation
()
*
wheelPanSpeed
);
double
scrollSpeed
;
double
scrollSpeed
;
if
(
abs
(
scrollVec
.
x
)
>
abs
(
scrollVec
.
y
)
)
if
(
std
::
abs
(
scrollVec
.
x
)
>
std
::
abs
(
scrollVec
.
y
)
)
scrollSpeed
=
scrollVec
.
x
;
scrollSpeed
=
scrollVec
.
x
;
else
else
scrollSpeed
=
scrollVec
.
y
;
scrollSpeed
=
scrollVec
.
y
;
...
...
include/geometry/seg.h
View file @
e6a10faa
...
@@ -344,7 +344,7 @@ inline int SEG::LineDistance( const VECTOR2I& aP, bool aDetermineSide ) const
...
@@ -344,7 +344,7 @@ inline int SEG::LineDistance( const VECTOR2I& aP, bool aDetermineSide ) const
ecoord
dist
=
(
p
*
aP
.
x
+
q
*
aP
.
y
+
r
)
/
sqrt
(
p
*
p
+
q
*
q
);
ecoord
dist
=
(
p
*
aP
.
x
+
q
*
aP
.
y
+
r
)
/
sqrt
(
p
*
p
+
q
*
q
);
return
aDetermineSide
?
dist
:
abs
(
dist
);
return
aDetermineSide
?
dist
:
std
::
abs
(
dist
);
}
}
inline
SEG
::
ecoord
SEG
::
TCoef
(
const
VECTOR2I
&
aP
)
const
inline
SEG
::
ecoord
SEG
::
TCoef
(
const
VECTOR2I
&
aP
)
const
...
...
include/geometry/shape_index.h
View file @
e6a10faa
...
@@ -46,13 +46,6 @@ static const SHAPE* shapeFunctor( T aItem )
...
@@ -46,13 +46,6 @@ static const SHAPE* shapeFunctor( T aItem )
return
aItem
->
Shape
();
return
aItem
->
Shape
();
}
}
/**
* shapeFunctor template function: specialization for T = SHAPE*
*/
template
<>
const
SHAPE
*
shapeFunctor
(
SHAPE
*
aItem
);
/**
/**
* boundingBox template method
* boundingBox template method
*
*
...
@@ -68,7 +61,6 @@ BOX2I boundingBox( T aObject )
...
@@ -68,7 +61,6 @@ BOX2I boundingBox( T aObject )
return
shapeFunctor
(
aObject
)
->
BBox
();
return
shapeFunctor
(
aObject
)
->
BBox
();
}
}
/**
/**
* acceptVisitor template method
* acceptVisitor template method
*
*
...
@@ -84,7 +76,6 @@ void acceptVisitor( T aObject, V aVisitor )
...
@@ -84,7 +76,6 @@ void acceptVisitor( T aObject, V aVisitor )
aVisitor
(
aObject
);
aVisitor
(
aObject
);
}
}
/**
/**
* collide template method
* collide template method
*
*
...
...
pcbnew/dialogs/dialog_create_array.cpp
View file @
e6a10faa
...
@@ -446,9 +446,9 @@ void DIALOG_CREATE_ARRAY::ARRAY_GRID_OPTIONS::TransformItem( int n, BOARD_ITEM*
...
@@ -446,9 +446,9 @@ void DIALOG_CREATE_ARRAY::ARRAY_GRID_OPTIONS::TransformItem( int n, BOARD_ITEM*
point
.
x
=
coords
.
x
*
m_delta
.
x
+
coords
.
y
*
m_offset
.
x
;
point
.
x
=
coords
.
x
*
m_delta
.
x
+
coords
.
y
*
m_offset
.
x
;
point
.
y
=
coords
.
y
*
m_delta
.
y
+
coords
.
x
*
m_offset
.
y
;
point
.
y
=
coords
.
y
*
m_delta
.
y
+
coords
.
x
*
m_offset
.
y
;
if
(
abs
(
m_stagger
)
>
1
)
if
(
std
::
abs
(
m_stagger
)
>
1
)
{
{
const
int
stagger
=
abs
(
m_stagger
);
const
int
stagger
=
std
::
abs
(
m_stagger
);
const
bool
sr
=
m_stagger_rows
;
const
bool
sr
=
m_stagger_rows
;
const
int
stagger_idx
=
(
(
sr
?
coords
.
y
:
coords
.
x
)
%
stagger
);
const
int
stagger_idx
=
(
(
sr
?
coords
.
y
:
coords
.
x
)
%
stagger
);
...
...
pcbnew/router/length_tuner_tool.cpp
View file @
e6a10faa
...
@@ -140,7 +140,7 @@ void LENGTH_TUNER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
...
@@ -140,7 +140,7 @@ void LENGTH_TUNER_TOOL::handleCommonEvents( const TOOL_EVENT& aEvent )
if
(
settingsDlg
.
ShowModal
()
)
if
(
settingsDlg
.
ShowModal
()
)
{
{
placer
->
UpdateSettings
(
settings
);
placer
->
UpdateSettings
(
settings
);
}
}
m_savedMeanderSettings
=
placer
->
MeanderSettings
();
m_savedMeanderSettings
=
placer
->
MeanderSettings
();
...
@@ -154,7 +154,7 @@ void LENGTH_TUNER_TOOL::updateStatusPopup( PNS_TUNE_STATUS_POPUP& aPopup )
...
@@ -154,7 +154,7 @@ void LENGTH_TUNER_TOOL::updateStatusPopup( PNS_TUNE_STATUS_POPUP& aPopup )
p
.
x
+=
20
;
p
.
x
+=
20
;
p
.
y
+=
20
;
p
.
y
+=
20
;
aPopup
.
Update
(
m_router
);
aPopup
.
Update
Status
(
m_router
);
aPopup
.
Move
(
p
);
aPopup
.
Move
(
p
);
}
}
...
@@ -207,7 +207,6 @@ void LENGTH_TUNER_TOOL::performTuning()
...
@@ -207,7 +207,6 @@ void LENGTH_TUNER_TOOL::performTuning()
end
=
evt
->
Position
();
end
=
evt
->
Position
();
m_router
->
Move
(
end
,
NULL
);
m_router
->
Move
(
end
,
NULL
);
updateStatusPopup
(
statusPopup
);
updateStatusPopup
(
statusPopup
);
}
}
else
if
(
evt
->
IsClick
(
BUT_LEFT
)
)
else
if
(
evt
->
IsClick
(
BUT_LEFT
)
)
{
{
...
...
pcbnew/router/pns_diff_pair.cpp
View file @
e6a10faa
...
@@ -332,7 +332,7 @@ bool PNS_DP_GATEWAYS::FitGateways( PNS_DP_GATEWAYS& aEntry, PNS_DP_GATEWAYS& aTa
...
@@ -332,7 +332,7 @@ bool PNS_DP_GATEWAYS::FitGateways( PNS_DP_GATEWAYS& aEntry, PNS_DP_GATEWAYS& aTa
int
bestScore
=
-
1000
;
int
bestScore
=
-
1000
;
DP_CANDIDATE
best
;
DP_CANDIDATE
best
;
bool
found
;
bool
found
=
false
;
BOOST_FOREACH
(
DP_CANDIDATE
c
,
candidates
)
BOOST_FOREACH
(
DP_CANDIDATE
c
,
candidates
)
{
{
...
...
pcbnew/router/pns_line_placer.h
View file @
e6a10faa
...
@@ -362,9 +362,6 @@ private:
...
@@ -362,9 +362,6 @@ private:
///> routing "tail": part of the track that has been already fixed due to collisions with obstacles
///> routing "tail": part of the track that has been already fixed due to collisions with obstacles
PNS_LINE
m_tail
;
PNS_LINE
m_tail
;
///> current algorithm iteration
int
m_iteration
;
///> pointer to world to search colliding items
///> pointer to world to search colliding items
PNS_NODE
*
m_world
;
PNS_NODE
*
m_world
;
...
@@ -385,20 +382,9 @@ private:
...
@@ -385,20 +382,9 @@ private:
///> Are we placing a via?
///> Are we placing a via?
bool
m_placingVia
;
bool
m_placingVia
;
///> current via diameter
int
m_viaDiameter
;
///> current via drill
int
m_viaDrill
;
///> current track width
int
m_currentWidth
;
int
m_currentNet
;
int
m_currentNet
;
int
m_currentLayer
;
int
m_currentLayer
;
bool
m_startsOnVia
;
VECTOR2I
m_currentEnd
,
m_currentStart
;
VECTOR2I
m_currentEnd
,
m_currentStart
;
PNS_LINE
m_currentTrace
;
PNS_LINE
m_currentTrace
;
...
...
pcbnew/router/pns_router.cpp
View file @
e6a10faa
...
@@ -335,7 +335,6 @@ void PNS_ROUTER::SyncWorld()
...
@@ -335,7 +335,6 @@ void PNS_ROUTER::SyncWorld()
}
}
PNS_ROUTER
::
PNS_ROUTER
()
PNS_ROUTER
::
PNS_ROUTER
()
{
{
theRouter
=
this
;
theRouter
=
this
;
...
@@ -947,7 +946,7 @@ void PNS_ROUTER::DumpLog()
...
@@ -947,7 +946,7 @@ void PNS_ROUTER::DumpLog()
bool
PNS_ROUTER
::
IsPlacingVia
()
const
bool
PNS_ROUTER
::
IsPlacingVia
()
const
{
{
if
(
!
m_placer
)
if
(
!
m_placer
)
return
NULL
;
return
false
;
return
m_placer
->
IsPlacingVia
();
return
m_placer
->
IsPlacingVia
();
}
}
...
...
pcbnew/router/pns_shove.h
View file @
e6a10faa
...
@@ -161,7 +161,6 @@ private:
...
@@ -161,7 +161,6 @@ private:
int
m_iter
;
int
m_iter
;
int
m_forceClearance
;
int
m_forceClearance
;
bool
m_multiLineMode
;
bool
m_multiLineMode
;
bool
m_headModified
;
};
};
#endif // __PNS_SHOVE_H
#endif // __PNS_SHOVE_H
pcbnew/router/pns_tune_status_popup.cpp
View file @
e6a10faa
...
@@ -36,7 +36,7 @@ PNS_TUNE_STATUS_POPUP::~PNS_TUNE_STATUS_POPUP()
...
@@ -36,7 +36,7 @@ PNS_TUNE_STATUS_POPUP::~PNS_TUNE_STATUS_POPUP()
}
}
void
PNS_TUNE_STATUS_POPUP
::
Update
(
PNS_ROUTER
*
aRouter
)
void
PNS_TUNE_STATUS_POPUP
::
Update
Status
(
PNS_ROUTER
*
aRouter
)
{
{
PNS_MEANDER_PLACER_BASE
*
placer
=
dynamic_cast
<
PNS_MEANDER_PLACER_BASE
*>
(
aRouter
->
Placer
()
);
PNS_MEANDER_PLACER_BASE
*
placer
=
dynamic_cast
<
PNS_MEANDER_PLACER_BASE
*>
(
aRouter
->
Placer
()
);
...
...
pcbnew/router/pns_tune_status_popup.h
View file @
e6a10faa
...
@@ -35,7 +35,7 @@ public:
...
@@ -35,7 +35,7 @@ public:
PNS_TUNE_STATUS_POPUP
(
PCB_EDIT_FRAME
*
aParent
);
PNS_TUNE_STATUS_POPUP
(
PCB_EDIT_FRAME
*
aParent
);
~
PNS_TUNE_STATUS_POPUP
();
~
PNS_TUNE_STATUS_POPUP
();
void
Update
(
PNS_ROUTER
*
aRouter
);
void
Update
Status
(
PNS_ROUTER
*
aRouter
);
private
:
private
:
wxStaticText
*
m_statusLine
;
wxStaticText
*
m_statusLine
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment