[Bf-blender-cvs] [15f2aab82a9] soc-2019-adaptive-cloth: Cloth: fix compilation error
ishbosamiya
noreply at git.blender.org
Tue Jul 16 21:20:18 CEST 2019
Commit: 15f2aab82a93cf9744045d1843dc51f5ab4e48b7
Author: ishbosamiya
Date: Wed Jul 17 00:46:57 2019 +0530
Branches: soc-2019-adaptive-cloth
https://developer.blender.org/rB15f2aab82a93cf9744045d1843dc51f5ab4e48b7
Cloth: fix compilation error
"count" was a global variable which caused an error while compiling on Windows with Ninja, switched to using local variable.
===================================================================
M source/blender/blenkernel/intern/cloth_remeshing.cpp
===================================================================
diff --git a/source/blender/blenkernel/intern/cloth_remeshing.cpp b/source/blender/blenkernel/intern/cloth_remeshing.cpp
index 2023c7ddddd..ccefd4fc268 100644
--- a/source/blender/blenkernel/intern/cloth_remeshing.cpp
+++ b/source/blender/blenkernel/intern/cloth_remeshing.cpp
@@ -1300,11 +1300,10 @@ static void cloth_remeshing_update_active_faces(vector<BMFace *> &active_faces,
new_active_faces.clear();
}
-int count;
-
static bool cloth_remeshing_collapse_edges(ClothModifierData *clmd,
vector<ClothSizing> &sizing,
- vector<BMFace *> &active_faces)
+ vector<BMFace *> &active_faces,
+ int &count)
{
for (int i = 0; i < active_faces.size(); i++) {
BMFace *f = active_faces[i];
@@ -1398,8 +1397,8 @@ static void cloth_remeshing_static(ClothModifierData *clmd)
}
}
int prev_mvert_num = clmd->clothObject->mvert_num;
- count = 0;
- while (cloth_remeshing_collapse_edges(clmd, sizing, active_faces)) {
+ int count = 0;
+ while (cloth_remeshing_collapse_edges(clmd, sizing, active_faces, count)) {
/* empty while */
}
printf("collapse edges count: %d\n", count);
More information about the Bf-blender-cvs
mailing list