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
a90975d1
Commit
a90975d1
authored
Oct 04, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FP_LIB_TABLE::ROW::SetType() ensures sensible value of "KiCad" if nothing good comes in.
parent
e0a0f596
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
17 deletions
+10
-17
fp_lib_table.cpp
common/fp_lib_table.cpp
+9
-16
fp_lib_table.h
include/fp_lib_table.h
+1
-1
No files found.
common/fp_lib_table.cpp
View file @
a90975d1
...
@@ -42,28 +42,21 @@
...
@@ -42,28 +42,21 @@
using
namespace
FP_LIB_TABLE_T
;
using
namespace
FP_LIB_TABLE_T
;
FP_LIB_TABLE
::
FP_LIB_TABLE
(
FP_LIB_TABLE
*
aFallBackTable
)
:
void
FP_LIB_TABLE
::
ROW
::
SetType
(
const
wxString
&
aType
)
fallBack
(
aFallBackTable
)
{
{
// not copying fall back, simply search aFallBackTable separately
type
=
IO_MGR
::
EnumFromStr
(
aType
);
// if "nickName not found".
if
(
IO_MGR
::
PCB_FILE_T
(
-
1
)
==
type
)
type
=
IO_MGR
::
KICAD
;
}
}
/*
FP_LIB_TABLE
::
FP_LIB_TABLE
(
FP_LIB_TABLE
*
aFallBackTable
)
:
void FP_LIB_TABLE::Paste( const FP_LIB_TABLE& aOther, int aDestNdx
)
fallBack
(
aFallBackTable
)
{
{
if( aDestNdx == -1 )
// not copying fall back, simply search aFallBackTable separately
aDestNdx = rows.size() - 1;
// if "nickName not found".
else if( unsigned( aDestNdx ) >= rows.size() )
return; // bad caller.
else
{
rows.assign( aOther.rows.begin(), aOther.rows.end() );
}
}
}
*/
void
FP_LIB_TABLE
::
Parse
(
FP_LIB_TABLE_LEXER
*
in
)
throw
(
IO_ERROR
,
PARSE_ERROR
)
void
FP_LIB_TABLE
::
Parse
(
FP_LIB_TABLE_LEXER
*
in
)
throw
(
IO_ERROR
,
PARSE_ERROR
)
...
...
include/fp_lib_table.h
View file @
a90975d1
...
@@ -181,7 +181,7 @@ public:
...
@@ -181,7 +181,7 @@ public:
* Function SetType
* Function SetType
* changes the type represented by this row.
* changes the type represented by this row.
*/
*/
void
SetType
(
const
wxString
&
aType
)
{
type
=
IO_MGR
::
EnumFromStr
(
aType
);
}
void
SetType
(
const
wxString
&
aType
)
;
/**
/**
* Function GetFullURI
* Function GetFullURI
...
...
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