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
68d752bb
Commit
68d752bb
authored
Dec 06, 2011
by
Wayne Stambaugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zero memory to duplicate behavior changed when C malloc() was replaced by C++ new().
parent
e8c3ca29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
board.cpp
pcbnew/board.cpp
+3
-0
No files found.
pcbnew/board.cpp
View file @
68d752bb
...
...
@@ -115,18 +115,21 @@ int MATRIX_ROUTING_HEAD::InitBoard()
/* allocate Board & initialize everything to empty */
m_BoardSide
[
kk
]
=
(
MATRIX_CELL
*
)
operator
new
(
ii
*
sizeof
(
MATRIX_CELL
)
);
memset
(
m_BoardSide
[
kk
],
0
,
ii
*
sizeof
(
MATRIX_CELL
)
);
if
(
m_BoardSide
[
kk
]
==
NULL
)
return
-
1
;
/***** allocate Distances *****/
m_DistSide
[
kk
]
=
(
DIST_CELL
*
)
operator
new
(
ii
*
sizeof
(
DIST_CELL
)
);
memset
(
m_DistSide
[
kk
],
0
,
ii
*
sizeof
(
DIST_CELL
)
);
if
(
m_DistSide
[
kk
]
==
NULL
)
return
-
1
;
/***** allocate Dir (chars) *****/
m_DirSide
[
kk
]
=
(
char
*
)
operator
new
(
ii
);
memset
(
m_DirSide
[
kk
],
0
,
ii
);
if
(
m_DirSide
[
kk
]
==
NULL
)
return
-
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