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:
authorHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
committerHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
commitef11238c743e6985fe325280fb13e05d6ec27378 (patch)
tree1dd2605a676bee52296535825b99f000a9c255eb /source/blender/simulation/intern/simulation_update.cc
parent1f768bbe4145daed111636ca09dd53b25b8d29b5 (diff)
parentec5f39208785c1bbe723054ffe69e1ac2ab470dd (diff)
Merge branch 'master' into property-search-uiproperty-search-ui
Diffstat (limited to 'source/blender/simulation/intern/simulation_update.cc')
-rw-r--r--source/blender/simulation/intern/simulation_update.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/simulation/intern/simulation_update.cc b/source/blender/simulation/intern/simulation_update.cc
index 32b582977d0..452b222bb08 100644
--- a/source/blender/simulation/intern/simulation_update.cc
+++ b/source/blender/simulation/intern/simulation_update.cc
@@ -143,7 +143,7 @@ class SampledDependencyAnimations : public DependencyAnimations {
const float factor = simulation_time_interval_.factor_at_time(simulation_time);
BLI_assert(factor > 0.0f && factor < 1.0f);
const float scaled_factor = factor * (cached_transforms.size() - 1);
- const int lower_sample = (int)scaled_factor;
+ const int lower_sample = static_cast<int>(scaled_factor);
const int upper_sample = lower_sample + 1;
const float mix_factor = scaled_factor - lower_sample;
r_transforms[i] = float4x4::interpolate(
@@ -205,7 +205,7 @@ static void prepare_dependency_animations(Depsgraph &depsgraph,
if (GS(id_cow->name) != ID_OB) {
continue;
}
- Object &object_cow = *(Object *)id_cow;
+ Object &object_cow = *reinterpret_cast<Object *>(id_cow);
constexpr int sample_count = 10;
Array<float4x4, sample_count> transforms(sample_count);
sample_object_transforms(object_cow, depsgraph, scene, scene_frame_interval, transforms);
@@ -233,7 +233,8 @@ void update_simulation_in_depsgraph(Depsgraph *depsgraph,
return;
}
- Simulation *simulation_orig = (Simulation *)DEG_get_original_id(&simulation_cow->id);
+ Simulation *simulation_orig = reinterpret_cast<Simulation *>(
+ DEG_get_original_id(&simulation_cow->id));
ResourceCollector resources;
SimulationInfluences influences;
@@ -317,8 +318,8 @@ bool update_simulation_dependencies(Simulation *simulation)
}
used_handles.add_new(next_handle);
- SimulationDependency *dependency = (SimulationDependency *)MEM_callocN(sizeof(*dependency),
- AT);
+ SimulationDependency *dependency = static_cast<SimulationDependency *>(
+ MEM_callocN(sizeof(*dependency), AT));
id_us_plus(id);
dependency->id = id;
dependency->handle = next_handle;