Skip to content

Commit 7af7f33

Browse files
committed
refactor(WasmZstdMeshIO): use WasmIOCommon openFileForReading
1 parent 525f9b5 commit 7af7f33

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/mesh-io/itkWasmZstdMeshIO.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
#include "itkWasmZstdMeshIO.h"
2020
#include "zstd.h"
2121

22+
#include "itkWasmIOCommon.h"
23+
2224
namespace itk
2325
{
2426

@@ -73,7 +75,7 @@ ::ReadMeshInformation()
7375
&& ( zstdPos == path.length() - 4 ) )
7476
{
7577
std::ifstream dataStream;
76-
this->OpenFileForReading( dataStream, this->GetFileName() );
78+
openFileForReading( dataStream, this->GetFileName(), false );
7779

7880
std::ostringstream ostrm;
7981
ostrm << dataStream.rdbuf();
@@ -146,7 +148,7 @@ ::Write()
146148
compressedBinary.resize(compressedSize);
147149

148150
std::ofstream outputStream;
149-
this->OpenFileForWriting( outputStream, path.c_str(), true, false );
151+
openFileForWriting( outputStream, path.c_str(), true, false );
150152
std::ostream_iterator<char> oIt(outputStream);
151153
std::copy(compressedBinary.begin(), compressedBinary.end(), oIt);
152154
return;

0 commit comments

Comments
 (0)