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
386d1fc2
Commit
386d1fc2
authored
Jan 10, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made two functions immune to empty containers.
parent
487b609e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
ratsnest.cpp
pcbnew/ratsnest.cpp
+4
-1
ratsnest_data.cpp
pcbnew/ratsnest_data.cpp
+1
-1
No files found.
pcbnew/ratsnest.cpp
View file @
386d1fc2
...
...
@@ -70,7 +70,10 @@ public:
void
MIN_SPAN_TREE_PADS
::
AddTreeToRatsnest
(
std
::
vector
<
RATSNEST_ITEM
>
&
aRatsnestList
)
{
std
::
vector
<
D_PAD
*>
&
padsBuffer
=
*
m_PadsList
;
std
::
vector
<
D_PAD
*>&
padsBuffer
=
*
m_PadsList
;
if
(
padsBuffer
.
empty
()
)
return
;
int
netcode
=
padsBuffer
[
0
]
->
GetNet
();
// Note: to get edges in minimum spanning tree,
// the index value 0 is not used: it is just
...
...
pcbnew/ratsnest_data.cpp
View file @
386d1fc2
...
...
@@ -240,7 +240,7 @@ void RN_NET::compute()
return
;
}
else
if
(
boardNodes
.
size
()
==
1
)
// This case is even simpler
else
if
(
boardNodes
.
size
()
==
1
||
boardNodes
.
empty
()
)
// This case is even simpler
{
m_rnEdges
.
reset
(
new
std
::
vector
<
RN_EDGE_PTR
>
(
0
)
);
...
...
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