Skip to content

Commit

Permalink
clean up duplication bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nyoungbq committed Nov 9, 2023
1 parent f83561a commit 914411a
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ struct WriteVtkDataArrayFunctor
if(i % 20 == 0 && i > 0)
{
ss << "\n";

if(i > nextDump)
{
fprintf(outputFile, "%s", ss.str().c_str());

ss = std::stringstream();

nextDump += k_BufferDumpVal;
}
}
if(useIntCast)
{
Expand All @@ -195,14 +204,6 @@ struct WriteVtkDataArrayFunctor
{
ss << " " << dataArray[i];
}

if(i > nextDump)
{
fprintf(outputFile, "%s", ss.str().c_str());
ss.clear();

nextDump += k_BufferDumpVal;
}
}
ss << "\n";
fprintf(outputFile, "%s", ss.str().c_str());
Expand Down

0 comments on commit 914411a

Please sign in to comment.