Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
committerJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
commit63916f5941b443dfc8566682bb75374e5abd553f (patch)
treefb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/physics/particle_edit_undo.c
parent0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/physics/particle_edit_undo.c')
-rw-r--r--source/blender/editors/physics/particle_edit_undo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c
index 205c04f54a9..8db6c4c853e 100644
--- a/source/blender/editors/physics/particle_edit_undo.c
+++ b/source/blender/editors/physics/particle_edit_undo.c
@@ -57,7 +57,6 @@
static void undoptcache_from_editcache(PTCacheUndo *undo, PTCacheEdit *edit)
{
PTCacheEditPoint *point;
- int i;
size_t mem_used_prev = MEM_get_memory_in_use();
@@ -68,7 +67,7 @@ static void undoptcache_from_editcache(PTCacheUndo *undo, PTCacheEdit *edit)
pa = undo->particles = MEM_dupallocN(edit->psys->particles);
- for (i = 0; i < edit->totpoint; i++, pa++) {
+ for (int i = 0; i < edit->totpoint; i++, pa++) {
pa->hair = MEM_dupallocN(pa->hair);
}
@@ -81,7 +80,7 @@ static void undoptcache_from_editcache(PTCacheUndo *undo, PTCacheEdit *edit)
pm = undo->mem_cache.first;
for (; pm; pm = pm->next) {
- for (i = 0; i < BPHYS_TOT_DATA; i++) {
+ for (int i = 0; i < BPHYS_TOT_DATA; i++) {
pm->data[i] = MEM_dupallocN(pm->data[i]);
}
}
@@ -90,7 +89,7 @@ static void undoptcache_from_editcache(PTCacheUndo *undo, PTCacheEdit *edit)
point = undo->points = MEM_dupallocN(edit->points);
undo->totpoint = edit->totpoint;
- for (i = 0; i < edit->totpoint; i++, point++) {
+ for (int i = 0; i < edit->totpoint; i++, point++) {
point->keys = MEM_dupallocN(point->keys);
/* no need to update edit key->co & key->time pointers here */
}