Commit: da8789bf66e3d4fc9395613a11844307ed81741a
Author: Sebastián Barschkis
Date:   Sat Jun 18 16:04:35 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBda8789bf66e3d4fc9395613a11844307ed81741a

small gzfile fix: declare file variable before using it and use const file name

===================================================================

M       intern/mantaflow/intern/SMOKE.cpp
M       intern/mantaflow/intern/SMOKE.h

===================================================================

diff --git a/intern/mantaflow/intern/SMOKE.cpp 
b/intern/mantaflow/intern/SMOKE.cpp
index 665fa7d..db30833 100644
--- a/intern/mantaflow/intern/SMOKE.cpp
+++ b/intern/mantaflow/intern/SMOKE.cpp
@@ -694,13 +694,14 @@ void* SMOKE::getGridPointer(std::string gridName, 
std::string solverName)
        return gridPointer;
 }
 
-void SMOKE::updateMeshData(char* filename)
+void SMOKE::updateMeshData(const char* filename)
 {
+       gzFile gzf;
        float dx =  1.0f / mMaxRes;
        float fbuffer[3];
        int ibuffer[3];
 
-       gzFile gzf = BLI_gzopen(filename, "rb1"); // do some compression
+       gzf = BLI_gzopen(filename, "rb"); // do some compression
        if (!gzf)
                std::cout << "readBobj: unable to open file" << std::endl;
        
diff --git a/intern/mantaflow/intern/SMOKE.h b/intern/mantaflow/intern/SMOKE.h
index 81887da..5aa4b58 100644
--- a/intern/mantaflow/intern/SMOKE.h
+++ b/intern/mantaflow/intern/SMOKE.h
@@ -133,7 +133,7 @@ public:
        inline int getTriangleYAt(int i) { return mTrianglesY[i]; }
        inline int getTriangleZAt(int i) { return mTrianglesZ[i]; }
        
-       void updateMeshData(char* filename);
+       void updateMeshData(const char* filename);
 
 private:
        // simulation constants

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to