From 914411aeb641e97b15579340e7a6a6566896dbf8 Mon Sep 17 00:00:00 2001 From: nyoungbq Date: Thu, 9 Nov 2023 16:43:27 -0500 Subject: [PATCH] clean up duplication bug --- .../Algorithms/VtkRectilinearGridWriter.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/VtkRectilinearGridWriter.cpp b/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/VtkRectilinearGridWriter.cpp index 4de9210299..5aafdb67df 100644 --- a/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/VtkRectilinearGridWriter.cpp +++ b/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/VtkRectilinearGridWriter.cpp @@ -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) { @@ -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());