diff options
Diffstat (limited to 'extern/mantaflow/preprocessed/fileio/iogrids.cpp')
-rw-r--r-- | extern/mantaflow/preprocessed/fileio/iogrids.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/extern/mantaflow/preprocessed/fileio/iogrids.cpp b/extern/mantaflow/preprocessed/fileio/iogrids.cpp index 2b8ee905f99..acd1bda5174 100644 --- a/extern/mantaflow/preprocessed/fileio/iogrids.cpp +++ b/extern/mantaflow/preprocessed/fileio/iogrids.cpp @@ -298,7 +298,7 @@ template<class T> void writeGridRaw(const string &name, Grid<T> *grid) debMsg("writing grid " << grid->getName() << " to raw file " << name, 1); #if NO_ZLIB != 1 - gzFile gzf = gzopen(name.c_str(), "wb1"); // do some compression + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "wb1"); // do some compression if (!gzf) errMsg("writeGridRaw: can't open file " << name); gzwrite(gzf, &((*grid)[0]), sizeof(T) * grid->getSizeX() * grid->getSizeY() * grid->getSizeZ()); @@ -313,7 +313,7 @@ template<class T> void readGridRaw(const string &name, Grid<T> *grid) debMsg("reading grid " << grid->getName() << " from raw file " << name, 1); #if NO_ZLIB != 1 - gzFile gzf = gzopen(name.c_str(), "rb"); + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "rb"); if (!gzf) errMsg("readGridRaw: can't open file " << name); @@ -350,7 +350,7 @@ void getUniFileSize(const string &name, int &x, int &y, int &z, int *t, std::str { x = y = z = 0; #if NO_ZLIB != 1 - gzFile gzf = gzopen(name.c_str(), "rb"); + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "rb"); if (gzf) { char ID[5] = {0, 0, 0, 0, 0}; gzread(gzf, ID, 4); @@ -499,7 +499,7 @@ template<class T> void writeGridUni(const string &name, Grid<T> *grid) else errMsg("writeGridUni: unknown element type"); - gzFile gzf = gzopen(name.c_str(), "wb1"); // do some compression + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "wb1"); // do some compression if (!gzf) errMsg("writeGridUni: can't open file " << name); @@ -527,7 +527,7 @@ template<class T> void readGridUni(const string &name, Grid<T> *grid) debMsg("Reading grid " << grid->getName() << " from uni file " << name, 1); #if NO_ZLIB != 1 - gzFile gzf = gzopen(name.c_str(), "rb"); + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "rb"); if (!gzf) errMsg("readGridUni: can't open file " << name); @@ -736,7 +736,7 @@ template<class T> void writeGrid4dUni(const string &name, Grid4d<T> *grid) else errMsg("writeGrid4dUni: unknown element type"); - gzFile gzf = gzopen(name.c_str(), "wb1"); // do some compression + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "wb1"); // do some compression if (!gzf) errMsg("writeGrid4dUni: can't open file " << name); @@ -778,7 +778,7 @@ void readGrid4dUni( // optionally - reuse file handle, if valid one is passed in fileHandle pointer... if ((!fileHandle) || (fileHandle && (*fileHandle == NULL))) { - gzf = gzopen(name.c_str(), "rb"); + gzf = (gzFile)safeGzopen(name.c_str(), "rb"); if (!gzf) errMsg("readGrid4dUni: can't open file " << name); @@ -905,7 +905,7 @@ template<class T> void writeGrid4dRaw(const string &name, Grid4d<T> *grid) debMsg("writing grid4d " << grid->getName() << " to raw file " << name, 1); #if NO_ZLIB != 1 - gzFile gzf = gzopen(name.c_str(), "wb1"); // do some compression + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "wb1"); // do some compression if (!gzf) errMsg("writeGrid4dRaw: can't open file " << name); gzwrite(gzf, @@ -922,7 +922,7 @@ template<class T> void readGrid4dRaw(const string &name, Grid4d<T> *grid) debMsg("reading grid4d " << grid->getName() << " from raw file " << name, 1); #if NO_ZLIB != 1 - gzFile gzf = gzopen(name.c_str(), "rb"); + gzFile gzf = (gzFile)safeGzopen(name.c_str(), "rb"); if (!gzf) errMsg("readGrid4dRaw: can't open file " << name); |