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
76aa0ba7
Commit
76aa0ba7
authored
Jan 18, 2014
by
maciej.
Committed by
Dick Hollenbeck
Jan 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile errors when wx3.x is built with --enable-stl
parent
a3211b2b
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
75 additions
and
80 deletions
+75
-80
edaappl.cpp
common/edaappl.cpp
+1
-6
gr_basic.cpp
common/gr_basic.cpp
+2
-2
class_worksheet_dataitem.cpp
common/page_layout/class_worksheet_dataitem.cpp
+1
-1
string.cpp
common/string.cpp
+19
-17
class_library.cpp
eeschema/class_library.cpp
+10
-10
class_library.h
eeschema/class_library.h
+7
-7
dialog_erc.cpp
eeschema/dialogs/dialog_erc.cpp
+1
-4
dialog_erc.h
eeschema/dialogs/dialog_erc.h
+0
-2
erc.cpp
eeschema/erc.cpp
+4
-6
erc.h
eeschema/erc.h
+2
-0
class_worksheet_dataitem.h
include/class_worksheet_dataitem.h
+17
-14
colors.h
include/colors.h
+1
-1
kicad_string.h
include/kicad_string.h
+3
-3
class_pcb_layer_widget.cpp
pcbnew/class_pcb_layer_widget.cpp
+1
-1
gen_modules_placefile.cpp
pcbnew/exporters/gen_modules_placefile.cpp
+2
-2
specctra.cpp
pcbnew/specctra.cpp
+1
-1
specctra.h
pcbnew/specctra.h
+1
-1
specctra_import.cpp
pcbnew/specctra_import.cpp
+2
-2
No files found.
common/edaappl.cpp
View file @
76aa0ba7
...
...
@@ -57,11 +57,6 @@
static
const
wxChar
*
CommonConfigPath
=
wxT
(
"kicad_common"
);
#ifdef __UNIX__
# define TMP_FILE "/tmp/kicad.tmp"
#endif
// some key strings used to store parameters in config
static
const
wxChar
backgroundColorKey
[]
=
wxT
(
"BackgroundColor"
);
static
const
wxChar
showPageLimitsKey
[]
=
wxT
(
"ShowPageLimits"
);
...
...
@@ -90,7 +85,7 @@ struct LANGUAGE_DESCR
BITMAP_DEF
m_Lang_Icon
;
/// Labels used in menus
const
wxChar
*
m_Lang_Label
;
wxString
m_Lang_Label
;
/// Set to true if the m_Lang_Label must not be translated
bool
m_DoNotTranslate
;
...
...
common/gr_basic.cpp
View file @
76aa0ba7
...
...
@@ -1451,12 +1451,12 @@ EDA_COLOR_T ColorMix( EDA_COLOR_T aColor1, EDA_COLOR_T aColor2 )
}
EDA_COLOR_T
ColorByName
(
const
wx
Char
*
aName
)
EDA_COLOR_T
ColorByName
(
const
wx
String
&
aName
)
{
// look for a match in the palette itself
for
(
EDA_COLOR_T
trying
=
BLACK
;
trying
<
NBCOLORS
;
trying
=
NextColor
(
trying
)
)
{
if
(
0
==
wxStricmp
(
aName
,
g_ColorRefs
[
trying
].
m_Name
)
)
if
(
0
==
aName
.
CmpNoCase
(
g_ColorRefs
[
trying
].
m_Name
)
)
return
trying
;
}
...
...
common/page_layout/class_worksheet_dataitem.cpp
View file @
76aa0ba7
...
...
@@ -430,7 +430,7 @@ const wxPoint WORKSHEET_DATAITEM_POLYPOLYGON::GetCornerPositionUi( unsigned aIdx
return
wxPoint
(
int
(
pos
.
x
),
int
(
pos
.
y
)
);
}
WORKSHEET_DATAITEM_TEXT
::
WORKSHEET_DATAITEM_TEXT
(
const
wx
Char
*
aTextBase
)
:
WORKSHEET_DATAITEM_TEXT
::
WORKSHEET_DATAITEM_TEXT
(
const
wx
String
&
aTextBase
)
:
WORKSHEET_DATAITEM
(
WS_TEXT
)
{
m_TextBase
=
aTextBase
;
...
...
common/string.cpp
View file @
76aa0ba7
...
...
@@ -211,31 +211,33 @@ wxString DateAndTime()
}
int
StrNumCmp
(
const
wx
Char
*
aString1
,
const
wxChar
*
aString2
,
int
aLength
,
bool
aIgnoreCase
)
int
StrNumCmp
(
const
wx
String
&
aString1
,
const
wxString
&
aString2
,
int
aLength
,
bool
aIgnoreCase
)
{
int
i
;
int
nb1
=
0
,
nb2
=
0
;
if
(
(
aString1
==
NULL
)
||
(
aString2
==
NULL
)
)
wxString
::
const_iterator
str1
=
aString1
.
begin
(),
str2
=
aString2
.
begin
();
if
(
(
str1
==
aString1
.
end
()
)
||
(
str2
==
aString2
.
end
()
)
)
return
0
;
for
(
i
=
0
;
i
<
aLength
;
i
++
)
{
if
(
isdigit
(
*
aString1
)
&&
isdigit
(
*
aString
2
)
)
/* digit found */
if
(
isdigit
(
*
str1
)
&&
isdigit
(
*
str
2
)
)
/* digit found */
{
nb1
=
0
;
nb2
=
0
;
while
(
isdigit
(
*
aString
1
)
)
while
(
isdigit
(
*
str
1
)
)
{
nb1
=
nb1
*
10
+
*
aString
1
-
'0'
;
aString
1
++
;
nb1
=
nb1
*
10
+
(
int
)
*
str
1
-
'0'
;
str
1
++
;
}
while
(
isdigit
(
*
aString
2
)
)
while
(
isdigit
(
*
str
2
)
)
{
nb2
=
nb2
*
10
+
*
aString
2
-
'0'
;
aString
2
++
;
nb2
=
nb2
*
10
+
(
int
)
*
str
2
-
'0'
;
str
2
++
;
}
if
(
nb1
<
nb2
)
...
...
@@ -247,29 +249,29 @@ int StrNumCmp( const wxChar* aString1, const wxChar* aString2, int aLength, bool
if
(
aIgnoreCase
)
{
if
(
toupper
(
*
aString1
)
<
toupper
(
*
aString
2
)
)
if
(
toupper
(
*
str1
)
<
toupper
(
*
str
2
)
)
return
-
1
;
if
(
toupper
(
*
aString1
)
>
toupper
(
*
aString
2
)
)
if
(
toupper
(
*
str1
)
>
toupper
(
*
str
2
)
)
return
1
;
if
(
(
*
aString1
==
0
)
&&
(
*
aString
2
==
0
)
)
if
(
(
*
str1
==
0
)
&&
(
*
str
2
==
0
)
)
return
0
;
}
else
{
if
(
*
aString1
<
*
aString
2
)
if
(
*
str1
<
*
str
2
)
return
-
1
;
if
(
*
aString1
>
*
aString
2
)
if
(
*
str1
>
*
str
2
)
return
1
;
if
(
(
*
aString1
==
0
)
&&
(
*
aString2
==
0
)
)
if
(
(
str1
==
aString1
.
end
()
)
&&
(
str2
==
aString2
.
end
()
)
)
return
0
;
}
aString
1
++
;
aString
2
++
;
str
1
++
;
str
2
++
;
}
return
0
;
...
...
eeschema/class_library.cpp
View file @
76aa0ba7
...
...
@@ -44,18 +44,18 @@
#include <wx/tokenzr.h>
#include <wx/regex.h>
static
const
wx
Char
*
duplicate_name_msg
=
static
const
wx
String
duplicate_name_msg
=
_
(
"Library <%s> has duplicate entry name <%s>.
\n
\
This may cause some unexpected behavior when loading components into a schematic."
);
bool
operator
==
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
Char
*
aName
)
bool
operator
==
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
String
&
aName
)
{
return
aLibrary
.
GetName
().
CmpNoCase
(
aName
)
==
0
;
}
bool
operator
!=
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
Char
*
aName
)
bool
operator
!=
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
String
&
aName
)
{
return
!
(
aLibrary
==
aName
);
}
...
...
@@ -224,10 +224,10 @@ bool CMP_LIBRARY::Conflicts( LIB_COMPONENT* aComponent )
}
LIB_ALIAS
*
CMP_LIBRARY
::
FindEntry
(
const
wx
Char
*
aName
)
LIB_ALIAS
*
CMP_LIBRARY
::
FindEntry
(
const
wx
String
&
aName
)
{
LIB_ALIAS_MAP
::
iterator
it
=
aliases
.
find
(
wxString
(
aName
)
);
LIB_ALIAS_MAP
::
iterator
it
=
aliases
.
find
(
aName
);
if
(
it
!=
aliases
.
end
()
)
return
(
*
it
).
second
;
...
...
@@ -245,7 +245,7 @@ LIB_ALIAS* CMP_LIBRARY::GetFirstEntry()
}
LIB_COMPONENT
*
CMP_LIBRARY
::
FindComponent
(
const
wx
Char
*
aName
)
LIB_COMPONENT
*
CMP_LIBRARY
::
FindComponent
(
const
wx
String
&
aName
)
{
LIB_COMPONENT
*
component
=
NULL
;
LIB_ALIAS
*
entry
=
FindEntry
(
aName
);
...
...
@@ -392,12 +392,12 @@ LIB_COMPONENT* CMP_LIBRARY::ReplaceComponent( LIB_COMPONENT* aOldComponent,
}
LIB_ALIAS
*
CMP_LIBRARY
::
GetNextEntry
(
const
wx
Char
*
aName
)
LIB_ALIAS
*
CMP_LIBRARY
::
GetNextEntry
(
const
wx
String
&
aName
)
{
if
(
aliases
.
empty
()
)
return
NULL
;
LIB_ALIAS_MAP
::
iterator
it
=
aliases
.
find
(
wxString
(
aName
)
);
LIB_ALIAS_MAP
::
iterator
it
=
aliases
.
find
(
aName
);
it
++
;
...
...
@@ -408,12 +408,12 @@ LIB_ALIAS* CMP_LIBRARY::GetNextEntry( const wxChar* aName )
}
LIB_ALIAS
*
CMP_LIBRARY
::
GetPreviousEntry
(
const
wx
Char
*
aName
)
LIB_ALIAS
*
CMP_LIBRARY
::
GetPreviousEntry
(
const
wx
String
&
aName
)
{
if
(
aliases
.
empty
()
)
return
NULL
;
LIB_ALIAS_MAP
::
iterator
it
=
aliases
.
find
(
wxString
(
aName
)
);
LIB_ALIAS_MAP
::
iterator
it
=
aliases
.
find
(
aName
);
if
(
it
==
aliases
.
begin
()
)
it
=
aliases
.
end
();
...
...
eeschema/class_library.h
View file @
76aa0ba7
...
...
@@ -240,7 +240,7 @@ public:
* @param aName - Name of entry, case insensitive.
* @return Entry if found. NULL if not found.
*/
LIB_ALIAS
*
FindEntry
(
const
wx
Char
*
aName
);
LIB_ALIAS
*
FindEntry
(
const
wx
String
&
aName
);
/**
* Find component by \a aName.
...
...
@@ -251,7 +251,7 @@ public:
* @param aName - Name of component, case insensitive.
* @return Component if found. NULL if not found.
*/
LIB_COMPONENT
*
FindComponent
(
const
wx
Char
*
aName
);
LIB_COMPONENT
*
FindComponent
(
const
wx
String
&
aName
);
/**
* Find alias by \a nName.
...
...
@@ -262,7 +262,7 @@ public:
* @param aName - Name of alias, case insensitive.
* @return Alias if found. NULL if not found.
*/
LIB_ALIAS
*
FindAlias
(
const
wx
Char
*
aName
)
LIB_ALIAS
*
FindAlias
(
const
wx
String
&
aName
)
{
return
(
LIB_ALIAS
*
)
FindEntry
(
aName
);
}
...
...
@@ -331,7 +331,7 @@ public:
* @param aName - Name of current entry.
* @return Next entry if entry name is found. Otherwise NULL.
*/
LIB_ALIAS
*
GetNextEntry
(
const
wx
Char
*
aName
);
LIB_ALIAS
*
GetNextEntry
(
const
wx
String
&
aName
);
/**
...
...
@@ -343,7 +343,7 @@ public:
* @param aName - Name of current entry.
* @return Previous entry if entry name is found, otherwise NULL.
*/
LIB_ALIAS
*
GetPreviousEntry
(
const
wx
Char
*
aName
);
LIB_ALIAS
*
GetPreviousEntry
(
const
wx
String
&
aName
);
/**
* Return the file name without path or extension.
...
...
@@ -525,7 +525,7 @@ public:
/**
* Case insensitive library name comparison.
*/
extern
bool
operator
==
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
Char
*
aName
);
extern
bool
operator
!=
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
Char
*
aName
);
extern
bool
operator
==
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
String
&
aName
);
extern
bool
operator
!=
(
const
CMP_LIBRARY
&
aLibrary
,
const
wx
String
&
aName
);
#endif // CLASS_LIBRARY_H
eeschema/dialogs/dialog_erc.cpp
View file @
76aa0ba7
...
...
@@ -290,10 +290,7 @@ void DIALOG_ERC::ReBuildMatrixPanel()
wxPoint
txtpos
;
txtpos
.
x
=
x
+
(
bitmap_size
.
x
/
2
);
txtpos
.
y
=
y
-
text_height
;
text
=
new
wxStaticText
(
m_matrixPanel
,
-
1
,
CommentERC_V
[
ii
],
txtpos
);
text
=
new
wxStaticText
(
m_matrixPanel
,
-
1
,
CommentERC_V
[
ii
],
txtpos
);
}
int
event_id
=
ID_MATRIX_0
+
ii
+
(
jj
*
PIN_NMAX
);
...
...
eeschema/dialogs/dialog_erc.h
View file @
76aa0ba7
...
...
@@ -17,8 +17,6 @@
extern
int
DiagErc
[
PIN_NMAX
][
PIN_NMAX
];
extern
bool
DiagErcTableInit
;
// go to true after DiagErc init
extern
int
DefaultDiagErc
[
PIN_NMAX
][
PIN_NMAX
];
extern
const
wxChar
*
CommentERC_H
[];
extern
const
wxChar
*
CommentERC_V
[];
/* Control identifiers */
#define ID_MATRIX_0 1800
...
...
eeschema/erc.cpp
View file @
76aa0ba7
...
...
@@ -82,7 +82,7 @@
*/
// Messages for matrix rows:
const
wx
Char
*
CommentERC_H
[]
=
const
wx
String
CommentERC_H
[]
=
{
_
(
"Input Pin.........."
),
_
(
"Output Pin........."
),
...
...
@@ -94,12 +94,11 @@ const wxChar* CommentERC_H[] =
_
(
"Power Output Pin..."
),
_
(
"Open Collector....."
),
_
(
"Open Emitter......."
),
_
(
"No Connection......"
),
NULL
_
(
"No Connection......"
)
};
// Messages for matrix columns
const
wx
Char
*
CommentERC_V
[]
=
const
wx
String
CommentERC_V
[]
=
{
_
(
"Input Pin"
),
_
(
"Output Pin"
),
...
...
@@ -111,8 +110,7 @@ const wxChar* CommentERC_V[] =
_
(
"Power Output Pin"
),
_
(
"Open Collector"
),
_
(
"Open Emitter"
),
_
(
"No Connection"
),
NULL
_
(
"No Connection"
)
};
...
...
eeschema/erc.h
View file @
76aa0ba7
...
...
@@ -45,6 +45,8 @@ enum errortype
UNC
// Error: unconnected pin
};
extern
const
wxString
CommentERC_H
[];
extern
const
wxString
CommentERC_V
[];
/// DRC error codes:
#define ERCE_UNSPECIFIED 0
...
...
include/class_worksheet_dataitem.h
View file @
76aa0ba7
...
...
@@ -267,6 +267,7 @@ public:
}
};
class
WORKSHEET_DATAITEM_POLYPOLYGON
:
public
WORKSHEET_DATAITEM
{
public
:
...
...
@@ -355,26 +356,27 @@ public:
bool
IsInsidePage
(
int
ii
)
const
;
};
class
WORKSHEET_DATAITEM_TEXT
:
public
WORKSHEET_DATAITEM
{
public
:
wxString
m_TextBase
;
// The basic text, with format symbols
wxString
m_FullText
;
// The expanded text, shown on screen
double
m_Orient
;
// Orientation in degrees
enum
EDA_TEXT_HJUSTIFY_T
m_Hjustify
;
enum
EDA_TEXT_VJUSTIFY_T
m_Vjustify
;
EDA_TEXT_HJUSTIFY_T
m_Hjustify
;
EDA_TEXT_VJUSTIFY_T
m_Vjustify
;
DSIZE
m_TextSize
;
DSIZE
m_BoundingBoxSize
;
// When not null, this is the max
// size of the full text.
// the text size will be modified
// to keep the full text insite this
// bound.
DSIZE
m_ConstrainedTextSize
;
// Actual text size, if constrained by
DSIZE
m_ConstrainedTextSize
;
// Actual text size, if constrained by
// the m_BoundingBoxSize constraint
public
:
WORKSHEET_DATAITEM_TEXT
(
const
wx
Char
*
aTextBase
);
WORKSHEET_DATAITEM_TEXT
(
const
wx
String
&
aTextBase
);
/**
* @return false (no end point)
...
...
@@ -467,6 +469,7 @@ public:
}
};
class
BITMAP_BASE
;
class
WORKSHEET_DATAITEM_BITMAP
:
public
WORKSHEET_DATAITEM
{
...
...
include/colors.h
View file @
76aa0ba7
...
...
@@ -134,7 +134,7 @@ inline void ColorApplyHighlightFlag( EDA_COLOR_T *aColor )
}
/// Find a color by name
EDA_COLOR_T
ColorByName
(
const
wx
Char
*
aName
);
EDA_COLOR_T
ColorByName
(
const
wx
String
&
aName
);
/// Find the nearest color match
EDA_COLOR_T
ColorFindNearest
(
const
wxColour
&
aColor
);
...
...
include/kicad_string.h
View file @
76aa0ba7
...
...
@@ -99,8 +99,8 @@ wxString DateAndTime();
* except that strings containing numbers are compared by their integer value not
* by their ASCII code.
*
* @param aString1 A wx
Char pointer
to the reference string.
* @param aString2 A wx
Char pointer
to the comparison string.
* @param aString1 A wx
String reference
to the reference string.
* @param aString2 A wx
String reference
to the comparison string.
* @param aLength The number of characters to compare. Set to -1 to compare
* the entire string.
* @param aIgnoreCase Use true to make the comparison case insensitive.
...
...
@@ -108,7 +108,7 @@ wxString DateAndTime();
* \a aString1 is equal to \a aString2, or 1 if \a aString1 is greater
* than \a aString2.
*/
int
StrNumCmp
(
const
wx
Char
*
aString1
,
const
wxChar
*
aString2
,
int
aLength
=
INT_MAX
,
int
StrNumCmp
(
const
wx
String
&
aString1
,
const
wxString
&
aString2
,
int
aLength
=
INT_MAX
,
bool
aIgnoreCase
=
false
);
/**
...
...
pcbnew/class_pcb_layer_widget.cpp
View file @
76aa0ba7
...
...
@@ -280,7 +280,7 @@ void PCB_LAYER_WIDGET::ReFill()
{
if
(
enabledLayers
&
GetLayerMask
(
layer
)
)
{
const
wxChar
*
dsc
;
wxString
dsc
;
switch
(
layer
)
{
case
LAYER_N_FRONT
:
...
...
pcbnew/exporters/gen_modules_placefile.cpp
View file @
76aa0ba7
...
...
@@ -55,8 +55,8 @@ class LIST_MOD // An helper class used to build a list of useful footprints
{
public
:
MODULE
*
m_Module
;
// Link to the actual footprint
const
wxChar
*
m_Reference
;
// Its schematic reference
const
wxChar
*
m_Value
;
// Its schematic value
wxString
m_Reference
;
// Its schematic reference
wxString
m_Value
;
// Its schematic value
LAYER_NUM
m_Layer
;
// its side (LAYER_N_BACK, or LAYER_N_FRONT)
};
...
...
pcbnew/specctra.cpp
View file @
76aa0ba7
...
...
@@ -108,7 +108,7 @@ int SPECCTRA_DB::findLayerName( const std::string& aLayerName ) const
}
void
SPECCTRA_DB
::
ThrowIOError
(
const
wx
Char
*
fmt
,
...
)
throw
(
IO_ERROR
)
void
SPECCTRA_DB
::
ThrowIOError
(
const
wx
String
&
fmt
,
...
)
throw
(
IO_ERROR
)
{
wxString
errText
;
va_list
args
;
...
...
pcbnew/specctra.h
View file @
76aa0ba7
...
...
@@ -3910,7 +3910,7 @@ public:
*/
void
LoadSESSION
(
const
wxString
&
filename
)
throw
(
IO_ERROR
);
void
ThrowIOError
(
const
wx
Char
*
fmt
,
...
)
throw
(
IO_ERROR
);
void
ThrowIOError
(
const
wx
String
&
fmt
,
...
)
throw
(
IO_ERROR
);
/**
* Function ExportPCB
...
...
pcbnew/specctra_import.cpp
View file @
76aa0ba7
...
...
@@ -198,7 +198,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro
{
wxString
layerName
=
FROM_UTF8
(
aPath
->
layer_id
.
c_str
()
);
ThrowIOError
(
_
(
"Session file uses invalid layer id
\"
%s
\"
"
),
GetChars
(
layerName
)
);
GetChars
(
layerName
)
);
}
TRACK
*
track
=
new
TRACK
(
sessionBoard
);
...
...
@@ -247,7 +247,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
if
(
shapeCount
==
0
)
{
ThrowIOError
(
_
(
"Session via padstack has no shapes"
)
);
ThrowIOError
(
_
(
"Session via padstack has no shapes"
)
);
}
else
if
(
shapeCount
==
1
)
{
...
...
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