Skip to content
Snippets Groups Projects
Commit e0f397d8 authored by Andrew Heather's avatar Andrew Heather
Browse files

BUG: ensightSurfaceReader - corrected initial list sizing

parent d6b3595f
Branches
Tags
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd. \\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -75,7 +75,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField ...@@ -75,7 +75,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
std::ostringstream oss; std::ostringstream oss;
label nMask = 0; label nMask = 0;
for (size_t chari = 0; chari < fieldFileName.size(); chari++) for (size_t chari = 0; chari < fieldFileName.size(); ++chari)
{ {
if (fieldFileName[chari] == '*') if (fieldFileName[chari] == '*')
{ {
...@@ -130,7 +130,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField ...@@ -130,7 +130,7 @@ Foam::tmp<Foam::Field<Type>> Foam::ensightSurfaceReader::readField
label n = surfPtr_->size(); label n = surfPtr_->size();
forAll(values, cmptI) forAll(values, cmptI)
{ {
values.setSize(n); values[cmptI].setCapacity(n);
} }
// Read data file using schema generated while reading the surface // Read data file using schema generated while reading the surface
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment