Skip to content

Replace std:: ofstream/ifstream with vtksys equivalents

Todd requested to merge todoooo/vtk:Feature_eliminate_std_filestream into master

Following on from !6122 (merged) and !6291 (merged), this is the last step in introducing UTF8 compliant file streams in VTK. In most cases the stream in question is exposed as a protected field in the class, so there is the potential that the shift to vtksys could affect downstream customers. Personally I think the stream fields should be private fields with a protected getter function to ostream or istream.

Also I tidied up vtkJavaScriptDataWriter to remove its possible memory leak problems.

The MR also addresses this issue #17750 (closed) where it is uncertain whether or not ios::binary flags should be passed to all Windows file streams (for MSVC, MINGW and CYGWIN) or just those compiled with MSVC.

Edited by Todd

Merge request reports