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
251f0c7f
Commit
251f0c7f
authored
Nov 27, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure a unique FootprintEnumerate() return list in GITHUB_PLUGIN when using COW.
parent
b0c739e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
github_plugin.cpp
pcbnew/github/github_plugin.cpp
+18
-3
No files found.
pcbnew/github/github_plugin.cpp
View file @
251f0c7f
...
...
@@ -42,6 +42,7 @@
#include <sstream>
#include <boost/ptr_container/ptr_map.hpp>
#include <set>
#include <wx/zipstrm.h>
#include <wx/mstream.h>
...
...
@@ -114,14 +115,28 @@ wxArrayString GITHUB_PLUGIN::FootprintEnumerate(
//D(printf("%s: this:%p aLibraryPath:'%s'\n", __func__, this, TO_UTF8(aLibraryPath) );)
cacheLib
(
aLibraryPath
,
aProperties
);
wxArrayString
ret
;
typedef
std
::
set
<
wxString
>
MYSET
;
MYSET
unique
;
if
(
m_pretty_dir
.
size
()
)
ret
=
PCB_IO
::
FootprintEnumerate
(
m_pretty_dir
);
{
wxArrayString
locals
=
PCB_IO
::
FootprintEnumerate
(
m_pretty_dir
);
for
(
unsigned
i
=
0
;
i
<
locals
.
GetCount
();
++
i
)
unique
.
insert
(
locals
[
i
]
);
}
for
(
MODULE_ITER
it
=
m_gh_cache
->
begin
();
it
!=
m_gh_cache
->
end
();
++
it
)
{
ret
.
Add
(
FROM_UTF8
(
it
->
first
.
c_str
()
)
);
unique
.
insert
(
FROM_UTF8
(
it
->
first
.
c_str
()
)
);
}
wxArrayString
ret
;
for
(
MYSET
::
const_iterator
it
=
unique
.
begin
();
it
!=
unique
.
end
();
++
it
)
{
ret
.
Add
(
*
it
);
}
return
ret
;
...
...
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