[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34297] trunk/blender/source/blender/ modifiers/intern/MOD_fluidsim_util.c: correct error in last commit, didnt break functionality since the return value wasn' t used but still confusing.
Campbell Barton
ideasman42 at gmail.com
Thu Jan 13 12:16:38 CET 2011
Revision: 34297
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34297
Author: campbellbarton
Date: 2011-01-13 11:16:38 +0000 (Thu, 13 Jan 2011)
Log Message:
-----------
correct error in last commit, didnt break functionality since the return value wasn't used but still confusing.
Modified Paths:
--------------
trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
Modified: trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c 2011-01-13 11:06:12 UTC (rev 34296)
+++ trunk/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c 2011-01-13 11:16:38 UTC (rev 34297)
@@ -235,7 +235,7 @@
mv = CDDM_get_verts(dm);
for(i=0; i<numverts; i++, mv++)
- gotBytes = (gzread(gzf, mv->co, sizeof(float) * 3) == sizeof(float) * 3);
+ gotBytes = gzread(gzf, mv->co, sizeof(float) * 3);
// should be the same as numverts
gotBytes = gzread(gzf, &wri, sizeof(wri));
@@ -257,7 +257,7 @@
}
// read normals from file (but don't save them yet)
- for(i=0, no_s= normals; i<numverts; i++, no_s += 3)
+ for(i=numverts, no_s= normals; i>0; i--, no_s += 3)
{
gotBytes = gzread(gzf, no, sizeof(float) * 3);
normal_float_to_short_v3(no_s, no);
@@ -277,11 +277,11 @@
// read triangles from file
mf = CDDM_get_faces(dm);
- for(i=0; i<numfaces; i++, mf++)
+ for(i=numfaces; i>0; i--, mf++)
{
int face[3];
- gotBytes = (gzread(gzf, face, sizeof(int) * 3) == sizeof(int) * 3);
+ gotBytes = gzread(gzf, face, sizeof(int) * 3);
// check if 3rd vertex has index 0 (not allowed in blender)
if(face[2])
More information about the Bf-blender-cvs
mailing list