Commit 4d9d3cb1 authored by David Cole's avatar David Cole

BUG: Fix bug 1953: replace strstream use with stringstream now that kwsys...

BUG: Fix bug 1953: replace strstream use with stringstream now that kwsys provides stringstream on all platforms. Many thanks to Sean McBride and Mathieu Coursolle from Rogue Research for all their effort developing the patch (and patience in waiting for its commit...!). COMP: Eliminate performance warning in generated Java wrappers regarding jboolean cast to bool. ENH: Exclude Java and Python wrappers (in addition to already excluded Tcl wrappers) from coverage analysis.
parent cc661fb6
......@@ -73,7 +73,7 @@ ENDIF(APPLE)
SET(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
"vtk.*TCLInit.cxx"
"vtk[^\\.]+Tcl.cxx"
"vtk[^\\.]+(Java|Python|Tcl).cxx"
"Utilities.kwsys"
"Utilities.vtksys"
)
......@@ -26,6 +26,8 @@
#include "vtkDoubleArray.h"
#include "vtkIdTypeArray.h"
#include <vtksys/ios/sstream>
#define SIZE 1000
template <class T, class A, class V>
......@@ -666,7 +668,7 @@ int otherArraysTest(ostream& strm)
int otherArrays(int, char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
// return otherArraysTest(vtkmsg_with_warning_C4701);
return otherArraysTest(cerr);
......
......@@ -20,6 +20,8 @@
#include "vtkByteSwap.h"
#include "vtkDebugLeaks.h"
#include <vtksys/ios/sstream>
int TestByteSwap(ostream& strm)
{
// actual test
......@@ -154,6 +156,6 @@ int TestByteSwap(ostream& strm)
int otherByteSwap(int,char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestByteSwap(vtkmsg_with_warning_C4701);
}
......@@ -19,6 +19,8 @@
#include "vtkStringArray.h"
#include "vtkIdList.h"
#include <vtksys/ios/sstream>
#define SIZE 1000
int doStringArrayTest(ostream& strm, int size)
......@@ -199,7 +201,7 @@ int otherStringArrayTest(ostream& strm)
int otherStringArray(int, char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
// return otherArraysTest(vtkmsg_with_warning_C4701);
return otherStringArrayTest(cerr);
......
......@@ -20,6 +20,8 @@
#include "vtkTimerLog.h"
#include "vtkDebugLeaks.h"
#include <vtksys/ios/sstream>
// this is needed for the unlink call
#if defined(__CYGWIN__)
#include <sys/unistd.h>
......@@ -68,7 +70,7 @@ void otherTimerLogTest(ostream& strm)
int otherTimerLog(int,char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
otherTimerLogTest(vtkmsg_with_warning_C4701);
return 0;
......
......@@ -18,6 +18,7 @@
#include "vtkObjectFactory.h"
#include "vtkSmartPointerBase.h"
#include <vtksys/ios/sstream>
#include <vtkstd/queue>
#include <vtkstd/stack>
#include <vtkstd/vector>
......@@ -35,7 +36,7 @@
#include <assert.h>
vtkCxxRevisionMacro(vtkGarbageCollector, "1.30");
vtkCxxRevisionMacro(vtkGarbageCollector, "1.31");
vtkStandardNewMacro(vtkGarbageCollector);
#if VTK_GARBAGE_COLLECTOR_HASH
......@@ -610,14 +611,12 @@ void vtkGarbageCollectorImpl::Report(vtkObjectBase* obj, void* ptr,
if(this->Debug && vtkObject::GetGlobalWarningDisplay())
{
vtkObjectBase* current = this->Current->Object;
ostrstream msg;
vtksys_ios::ostringstream msg;
msg << "Report: "
<< current->GetClassName() << "(" << current << ") "
<< (desc?desc:"")
<< " -> " << obj->GetClassName() << "(" << obj << ")";
msg << ends;
vtkDebugMacro(<< msg.str());
msg.rdbuf()->freeze(0);
vtkDebugMacro(<< msg.str().c_str());
}
// Forward call to the internal implementation.
......@@ -708,7 +707,7 @@ void vtkGarbageCollectorImpl::PrintComponent(ComponentType* c)
{
if(this->Debug && vtkObject::GetGlobalWarningDisplay())
{
ostrstream msg;
vtksys_ios::ostringstream msg;
msg << "Identified strongly connected component "
<< c->Identifier << " with net reference count "
<< c->NetCount << ":";
......@@ -720,9 +719,7 @@ void vtkGarbageCollectorImpl::PrintComponent(ComponentType* c)
<< " with " << count << " external "
<< ((count == 1)? "reference" : "references");
}
msg << ends;
vtkDebugMacro(<< msg.str());
msg.rdbuf()->freeze(0);
vtkDebugMacro(<< msg.str().c_str());
}
}
#else
......
......@@ -33,7 +33,6 @@
#endif
# include <iostream> // Include real ansi istream and ostream.
# include <strstream> // Include real ansi strstreams.
# include <fstream> // Include real ansi ifstream and ofstream.
# include <iomanip> // Include real ansi io manipulators.
......@@ -52,9 +51,6 @@ using std::endl;
using std::ends;
using std::ostream;
using std::istream;
using std::ostrstream;
using std::istrstream;
using std::strstream;
using std::ofstream;
using std::ifstream;
using std::fstream;
......@@ -71,11 +67,6 @@ using std::fstream;
# else
# include <iostream.h> // Include old-style istream and ostream.
# include <iomanip.h>
# if defined(_MSC_VER)
# include <strstrea.h> // Include old-style strstream from MSVC.
# else
# include <strstream.h> // Include old-style strstream.
# endif
# include <fstream.h> // Include old-style ifstream and ofstream.
# endif
#endif
......
......@@ -17,6 +17,8 @@
#include "vtkDebugLeaks.h"
#include "vtkGarbageCollector.h"
#include <vtksys/ios/sstream>
#define vtkBaseDebugMacro(x)
class vtkObjectBaseToGarbageCollectorFriendship
......@@ -172,15 +174,15 @@ void vtkObjectBase::UnRegister(vtkObjectBase* o)
void vtkObjectBase::CollectRevisions(ostream& os)
{
os << "vtkObjectBase 1.15\n";
os << "vtkObjectBase 1.16\n";
}
void vtkObjectBase::PrintRevisions(ostream& os)
{
ostrstream revisions;
vtksys_ios::ostringstream revisions;
this->CollectRevisions(revisions);
revisions << ends;
const char* c = revisions.str();
vtksys_stl::string s = revisions.str();
const char* c = s.c_str();
while(*c)
{
const char* beginClass = 0;
......@@ -222,7 +224,6 @@ void vtkObjectBase::PrintRevisions(ostream& os)
++c;
}
}
revisions.rdbuf()->freeze(0);
}
//----------------------------------------------------------------------------
......
......@@ -25,6 +25,8 @@
#include "vtkTimeStamp.h"
#include "vtkWindows.h"
#include <vtksys/ios/sstream>
#include <vtkstd/map>
#include <vtkstd/string>
......@@ -100,11 +102,10 @@ static PyObject *PyVTKObject_PyString(PyVTKObject *self)
}
PyErr_Clear();
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
self->vtk_ptr->Print(vtkmsg_with_warning_C4701);
vtkmsg_with_warning_C4701.put('\0');
PyObject *res = PyString_FromString(vtkmsg_with_warning_C4701.str());
vtkmsg_with_warning_C4701.rdbuf()->freeze(0);
PyObject *res = PyString_FromString(vtkmsg_with_warning_C4701.str().c_str());
return res;
}
......
......@@ -24,6 +24,8 @@
#include "vtkIdTypeArray.h"
#include "vtkQuad.h"
#include <vtksys/ios/sstream>
int TestCellArray(ostream& strm)
{
// actual test
......@@ -81,6 +83,6 @@ int TestCellArray(ostream& strm)
int otherCellArray(int,char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestCellArray(vtkmsg_with_warning_C4701);
}
......@@ -36,6 +36,7 @@
#include "vtkPentagonalPrism.h"
#include "vtkHexagonalPrism.h"
#include <vtksys/ios/sstream>
int TestOCB(ostream& strm)
{
......@@ -494,6 +495,6 @@ int TestOCB(ostream& strm)
int otherCellBoundaries(int, char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestOCB(vtkmsg_with_warning_C4701);
}
......@@ -36,6 +36,8 @@
#include "vtkPentagonalPrism.h"
#include "vtkHexagonalPrism.h"
#include <vtksys/ios/sstream>
int TestOCP(ostream& strm)
{
// actual test
......@@ -578,6 +580,6 @@ int TestOCP(ostream& strm)
int otherCellPosition(int, char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestOCP(vtkmsg_with_warning_C4701);
}
......@@ -20,6 +20,8 @@
#include "vtkColorTransferFunction.h"
#include "vtkDebugLeaks.h"
#include <vtksys/ios/sstream>
int Test(ostream& strm)
{
int i, j, k;
......@@ -147,6 +149,6 @@ int Test(ostream& strm)
int otherColorTransferFunction(int, char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return Test(vtkmsg_with_warning_C4701);
}
......@@ -22,6 +22,8 @@
#include "vtkPointData.h"
#include "vtkCellData.h"
#include <vtksys/ios/sstream>
#include "vtkDebugLeaks.h"
void TestOEC(ostream& strm)
......@@ -93,7 +95,7 @@ void TestOEC(ostream& strm)
int otherEmptyCell(int , char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
TestOEC(vtkmsg_with_warning_C4701);
return 0;
......
......@@ -28,6 +28,8 @@
#include "vtkRectilinearGrid.h"
#include "vtkShortArray.h"
#include <vtksys/ios/sstream>
int TestORG(ostream& strm)
{
int i, j, k;
......@@ -597,6 +599,6 @@ int TestORG(ostream& strm)
int otherRectilinearGrid(int,char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestORG(vtkmsg_with_warning_C4701);
}
......@@ -28,6 +28,8 @@
#include "vtkShortArray.h"
#include "vtkStructuredGrid.h"
#include <vtksys/ios/sstream>
int TestOSG(ostream& strm)
{
int i, j, k;
......@@ -629,6 +631,6 @@ int TestOSG(ostream& strm)
int otherStructuredGrid(int,char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestOSG(vtkmsg_with_warning_C4701);
}
......@@ -29,6 +29,8 @@
#include "vtkQuadraticPyramid.h"
#include "vtkPoints.h"
#include <vtksys/ios/sstream>
void ComputeDataValues(vtkPoints *pts, double *edgeValues)
{
double x[3];
......@@ -396,6 +398,6 @@ int TestQE(ostream& strm)
int quadraticEvaluation(int,char *[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
return TestQE(vtkmsg_with_warning_C4701);
}
......@@ -1680,7 +1680,7 @@ int TestWithPointsAndCellsAndPointData(ostream &strm)
int otherCreation(int vtkNotUsed(argc),
char *vtkNotUsed(argv)[])
{
ostrstream vtkmsg_with_warning_C4701;
vtksys_ios::ostringstream vtkmsg_with_warning_C4701;
if (TestEmpty(cout))
{
......
......@@ -30,11 +30,12 @@
#include "vtkDoubleArray.h"
#include "vtkSmartPointer.h"
#include <vtksys/ios/sstream>
#include <sys/stat.h>
#include <vtkstd/string>
#include <vtkstd/vector>
vtkCxxRevisionMacro(vtkFacetReader, "1.3");
vtkCxxRevisionMacro(vtkFacetReader, "1.4");
vtkStandardNewMacro(vtkFacetReader);
//------------------------------------------------------------------------------
......@@ -289,7 +290,8 @@ int vtkFacetReader::RequestData(
}
char* strPtr = &(*stringBuffer.begin());
strcpy(strPtr, line.c_str());
istrstream lineStream(strPtr);
vtkstd::string str(strPtr, stringBuffer.size());
vtksys_ios::istringstream lineStream(str);
vtkIdType kk;
int material = -1, relativePartNumber = -1;
for ( kk = 0; kk < num_points_per_cell; kk ++ )
......
......@@ -40,7 +40,9 @@
#include "vtkTIFFWriter.h"
#include "vtkTexture.h"
vtkCxxRevisionMacro(vtkRIBExporter, "1.63");
#include <vtksys/ios/sstream>
vtkCxxRevisionMacro(vtkRIBExporter, "1.64");
vtkStandardNewMacro(vtkRIBExporter);
typedef double RtColor[3];
......@@ -837,7 +839,7 @@ void vtkRIBExporter::WritePolygons (vtkPolyData *polyData,
if ( pointData )
{
int cc, aa;
ostrstream str_with_warning_C4701;
vtksys_ios::ostringstream str_with_warning_C4701;
for ( cc = 0; cc < pointData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = pointData->GetArray(cc);
......@@ -855,15 +857,13 @@ void vtkRIBExporter::WritePolygons (vtkPolyData *polyData,
}
str_with_warning_C4701 << "] ";
}
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
}
if ( cellData )
{
int cc, aa;
ostrstream str_with_warning_C4701;
vtksys_ios::ostringstream str_with_warning_C4701;
for ( cc = 0; cc < cellData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = cellData->GetArray(cc);
......@@ -881,15 +881,13 @@ void vtkRIBExporter::WritePolygons (vtkPolyData *polyData,
}
str_with_warning_C4701 << "] ";
}
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
}
if ( fieldData )
{
int cc, aa;
ostrstream str_with_warning_C4701;
vtksys_ios::ostringstream str_with_warning_C4701;
for ( cc = 0; cc < fieldData->GetNumberOfArrays(); cc ++ )
{
......@@ -908,9 +906,7 @@ void vtkRIBExporter::WritePolygons (vtkPolyData *polyData,
}
str_with_warning_C4701 << "] ";
}
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
}
}
......@@ -1093,7 +1089,7 @@ void vtkRIBExporter::WriteStrips (vtkPolyData *polyData,
if ( pointData )
{
int cc, aa;
ostrstream str_with_warning_C4701;
vtksys_ios::ostringstream str_with_warning_C4701;
for ( cc = 0; cc < pointData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = pointData->GetArray(cc);
......@@ -1111,15 +1107,13 @@ void vtkRIBExporter::WriteStrips (vtkPolyData *polyData,
}
str_with_warning_C4701 << "] ";
}
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
}
if ( cellData )
{
int cc, aa;
ostrstream str_with_warning_C4701;
vtksys_ios::ostringstream str_with_warning_C4701;
for ( cc = 0; cc < cellData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = cellData->GetArray(cc);
......@@ -1137,15 +1131,13 @@ void vtkRIBExporter::WriteStrips (vtkPolyData *polyData,
}
str_with_warning_C4701 << "] ";
}
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
}
if ( fieldData )
{
int cc, aa;
ostrstream str_with_warning_C4701;
vtksys_ios::ostringstream str_with_warning_C4701;
for ( cc = 0; cc < fieldData->GetNumberOfArrays(); cc ++ )
{
vtkDataArray *array = fieldData->GetArray(cc);
......@@ -1163,9 +1155,7 @@ void vtkRIBExporter::WriteStrips (vtkPolyData *polyData,
}
str_with_warning_C4701 << "] ";
}
str_with_warning_C4701 << ends;
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str() );
str_with_warning_C4701.rdbuf()->freeze(0);
fprintf ( this->FilePtr, "%s", str_with_warning_C4701.str().c_str() );
}
}
fprintf (this->FilePtr, "\n");
......
......@@ -40,6 +40,7 @@
#include "vtkUnsignedIntArray.h"
#include "vtkUnsignedLongArray.h"
#include "vtkUnsignedShortArray.h"
#include <vtksys/ios/sstream>
// We only have vtkTypeUInt64Array if we have long long
// or we have __int64 with conversion to double.
......@@ -57,7 +58,7 @@
// so it would be nice to put this in a common file.
static int my_getline(istream& stream, vtkStdString &output, char delim='\n');
vtkCxxRevisionMacro(vtkDataReader, "1.145");
vtkCxxRevisionMacro(vtkDataReader, "1.146");
vtkStandardNewMacro(vtkDataReader);
vtkCxxSetObjectMacro(vtkDataReader, InputArray, vtkCharArray);
......@@ -423,15 +424,17 @@ int vtkDataReader::OpenVTKFile()
if (this->InputArray)
{
vtkDebugMacro(<< "Reading from InputArray");
this->IS = new istrstream(this->InputArray->GetPointer(0),
vtkstd::string str(this->InputArray->GetPointer(0),
static_cast<size_t>( this->InputArray->GetNumberOfTuples() *
this->InputArray->GetNumberOfComponents()) );
this->IS = new vtksys_ios::istringstream(str);
return 1;
}
else if (this->InputString)
{
vtkDebugMacro(<< "Reading from InputString");
this->IS = new istrstream(this->InputString, this->InputStringLength);
vtkstd::string str(this->InputString, this->InputStringLength);
this->IS = new vtksys_ios::istringstream(str);
return 1;
}
}
......@@ -2594,18 +2597,17 @@ int vtkDataReader::DecodeString(char *resname, const char* name)
{
return 0;
}
//strcpy(resname, name);
ostrstream str;
int cc = 0;
vtksys_ios::ostringstream str;
size_t cc = 0;
unsigned int ch;
int len = static_cast<int>(strlen(name));
int reslen = 0;
size_t len = strlen(name);
size_t reslen = 0;
char buffer[10] = "0x";
while(name[cc])
{
if ( name[cc] == '%' )
{
if ( cc <= len - 3 )
if ( cc <= (len - 3) )
{
buffer[2] = name[cc+1];
buffer[3] = name[cc+2];
......@@ -2623,9 +2625,8 @@ int vtkDataReader::DecodeString(char *resname, const char* name)
}
cc ++;
}
str << ends;
strncpy(resname, str.str(), reslen+1);
str.rdbuf()->freeze(0);
strncpy(resname, str.str().c_str(), reslen+1);
resname[reslen+1] = 0;
return reslen;
}
......
......@@ -37,8 +37,10 @@
#include "vtkUnsignedIntArray.h"
#include "vtkUnsignedLongArray.h"
#include "vtkUnsignedShortArray.h"
#include <vtksys/ios/sstream>
vtkCxxRevisionMacro(vtkDataWriter, "1.120");
vtkCxxRevisionMacro(vtkDataWriter, "1.121");
vtkStandardNewMacro(vtkDataWriter);
// this undef is required on the hp. vtkMutexLock ends up including
......@@ -171,8 +173,8 @@ ostream *vtkDataWriter::OpenVTKFile()
+ 1024 * input->GetActualMemorySize());
this->OutputString = new char[this->OutputStringAllocatedLength];
fptr = new ostrstream(this->OutputString,
this->OutputStringAllocatedLength);
vtkstd::string str(this->OutputString, this->OutputStringAllocatedLength);
fptr = new vtksys_ios::ostringstream(str);
}
else
{
......@@ -1380,21 +1382,20 @@ void vtkDataWriter::CloseVTKFile(ostream *fp)
{
if (this->WriteToOutputString)
{
char *tmp;
ostrstream *ostr = (ostrstream*)(fp);
this->OutputStringLength = ostr->pcount();
vtksys_ios::ostringstream *ostr = (vtksys_ios::ostringstream*)(fp);
this->OutputStringLength = ostr->str().length();
if (this->OutputStringLength == this->OutputStringAllocatedLength)
{
vtkErrorMacro("OutputString was not long enough.");
}
// Sanity check.
tmp = ostr->str();
if (tmp != this->OutputString)
vtksys_stl::string s = ostr->str();
const char *tmp = s.c_str();
if (strcmp(this->OutputString, tmp) != 0)
{
vtkErrorMacro("String mismatch");
}
this->OutputString = tmp;
}
delete fp;
}
......
......@@ -52,12 +52,13 @@
#include "vtkstd/vector"
#include "vtkstd/set"
#include "vtksys/ios/fstream"
#include "vtksys/ios/sstream"
#include "vtkstd/algorithm"
#include <ctype.h>
#include <sys/stat.h>
vtkCxxRevisionMacro(vtkFLUENTReader, "1.13");
vtkCxxRevisionMacro(vtkFLUENTReader, "1.14");
vtkStandardNewMacro(vtkFLUENTReader);
//Structures
......@@ -2501,8 +2502,7 @@ void vtkFLUENTReader::GetNodesAscii()
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->
value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
double x, y, z;
if (this->GridDimension == 3)
......@@ -2644,8 +2644,7 @@ void vtkFLUENTReader::GetCellsAscii()
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->
value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
for (int i = firstIndex; i <=lastIndex; i++)
{
pdatastream >> this->Cells->value[i].type;
......@@ -2730,8 +2729,7 @@ void vtkFLUENTReader::GetFacesAscii()
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->
value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
int numberOfNodesInFace = 0;
for (int i = firstIndex; i <=lastIndex; i++)
......@@ -2847,8 +2845,7 @@ void vtkFLUENTReader::GetPeriodicShadowFacesAscii()
int dstart = this->CaseBuffer->value.find('(', 7);
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
int faceIndex1, faceIndex2;
for (int i = firstIndex; i <=lastIndex; i++)
......@@ -2897,8 +2894,7 @@ void vtkFLUENTReader::GetCellTreeAscii()
int dstart = this->CaseBuffer->value.find('(', 7);
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
int numberOfKids, kid;
for (int i = cellId0; i <=cellId1; i++)
......@@ -2955,8 +2951,7 @@ void vtkFLUENTReader::GetFaceTreeAscii()
int dstart = this->CaseBuffer->value.find('(', 7);
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
int numberOfKids, kid;
for (int i = faceId0; i <=faceId1; i++)
......@@ -3011,8 +3006,7 @@ void vtkFLUENTReader::GetInterfaceFaceParentsAscii()
int dstart = this->CaseBuffer->value.find('(', 7);
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;
vtksys_ios::stringstream pdatastream(pdata);
int parentId0, parentId1;
for (int i = faceId0; i <=faceId1; i++)
......@@ -3065,8 +3059,7 @@ void vtkFLUENTReader::GetNonconformalGridInterfaceFaceInformationAscii()
int dstart = this->CaseBuffer->value.find('(', 7);
int dend = this->CaseBuffer->value.find(')', dstart+1);
vtkstd::string pdata = this->CaseBuffer->value.substr(dstart+1, dend-start-1);
strstream pdatastream;
pdatastream << pdata.c_str() << ends;