Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Haocheng LIU
SMTK
Commits
7c251973
Commit
7c251973
authored
Jan 19, 2016
by
John Tourtellott
Browse files
Fix memory allocation in Tessellation::extract()
Also removed a couple unused vars
parent
5e2a9f57
Changes
1
Hide whitespace changes
Inline
Side-by-side
smtk/mesh/ExtractTessellation.cxx
View file @
7c251973
...
...
@@ -273,7 +273,10 @@ void Tessellation::extract( const smtk::mesh::CellSet& cs,
this
->
m_connectivity
.
resize
(
connectivityLength
);
this
->
m_cellLocations
.
resize
(
numberOfCells
);
this
->
m_cellTypes
.
resize
(
numberOfPoints
*
3
);
this
->
m_cellTypes
.
resize
(
numberOfCells
);
//since the input PointSet can contain more points that the computed number,
//set numberOfPoints to the PointSet size.
numberOfPoints
=
ps
.
size
();
this
->
m_points
.
resize
(
numberOfPoints
*
3
);
smtk
::
mesh
::
PreAllocatedTessellation
tess
(
&
this
->
m_connectivity
[
0
],
...
...
@@ -400,8 +403,6 @@ void extractTessellation( const smtk::mesh::CellSet& cs,
}
//we now have to read in the points if requested
const
std
::
size_t
connLength
=
conn_index
;
boost
::
int64_t
*
conn
=
tess
.
m_connectivity
;
if
(
fetch_dPoints
)
{
ps
.
get
(
tess
.
m_dpoints
);
...
...
Write
Preview
Supports
Markdown
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