diff options
Diffstat (limited to 'source/blender/compositor')
5 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc index ceb52feb9b4..11e3c1507d9 100644 --- a/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc +++ b/source/blender/compositor/intern/COM_FullFrameExecutionModel.cc @@ -271,7 +271,7 @@ void FullFrameExecutionModel::update_progress_bar() { const bNodeTree *tree = context_.get_bnodetree(); if (tree) { - const float progress = num_operations_finished_ / static_cast<float>(operations_.size()); + const float progress = num_operations_finished_ / float(operations_.size()); tree->progress(tree->prh, progress); char buf[128]; diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cc b/source/blender/compositor/operations/COM_ReadBufferOperation.cc index 81f046af1b9..224d2ea0f41 100644 --- a/source/blender/compositor/operations/COM_ReadBufferOperation.cc +++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cc @@ -31,8 +31,7 @@ void ReadBufferOperation::determine_canvas(const rcti &preferred_area, rcti &r_a /** \todo may not occur! But does with blur node. */ if (memory_proxy_->get_executor()) { - uint resolution[2] = {static_cast<uint>(BLI_rcti_size_x(&r_area)), - static_cast<uint>(BLI_rcti_size_y(&r_area))}; + uint resolution[2] = {uint(BLI_rcti_size_x(&r_area)), uint(BLI_rcti_size_y(&r_area))}; memory_proxy_->get_executor()->set_resolution(resolution); } diff --git a/source/blender/compositor/operations/COM_SMAAOperation.cc b/source/blender/compositor/operations/COM_SMAAOperation.cc index 261426b31e2..55983572ede 100644 --- a/source/blender/compositor/operations/COM_SMAAOperation.cc +++ b/source/blender/compositor/operations/COM_SMAAOperation.cc @@ -404,7 +404,7 @@ void SMAABlendingWeightCalculationOperation::init_execution() void SMAABlendingWeightCalculationOperation::set_corner_rounding(float rounding) { /* UI values are between 0 and 1 for simplicity but algorithm expects values between 0 and 100 */ - corner_rounding_ = static_cast<int>(scalenorm(0, 100, rounding)); + corner_rounding_ = int(scalenorm(0, 100, rounding)); } void SMAABlendingWeightCalculationOperation::execute_pixel(float output[4], diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc index 451c76bb36a..9a02bd70586 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cc @@ -390,7 +390,7 @@ void VariableSizeBokehBlurOperation::update_memory_buffer_partial(MemoryBuffer * const float max_dim = MAX2(this->get_width(), this->get_height()); p.scalar = do_size_scale_ ? (max_dim / 100.0f) : 1.0f; - p.max_blur_scalar = static_cast<int>(max_size * p.scalar); + p.max_blur_scalar = int(max_size * p.scalar); CLAMP(p.max_blur_scalar, 1, max_blur_); for (BuffersIterator<float> it = output->iterate_with({p.image_input, p.size_input}, area); diff --git a/source/blender/compositor/realtime_compositor/intern/context.cc b/source/blender/compositor/realtime_compositor/intern/context.cc index 64ac29af3d1..924398f6747 100644 --- a/source/blender/compositor/realtime_compositor/intern/context.cc +++ b/source/blender/compositor/realtime_compositor/intern/context.cc @@ -17,9 +17,8 @@ int Context::get_frame_number() const float Context::get_time() const { - const float frame_number = static_cast<float>(get_frame_number()); - const float frame_rate = static_cast<float>(get_scene()->r.frs_sec) / - static_cast<float>(get_scene()->r.frs_sec_base); + const float frame_number = float(get_frame_number()); + const float frame_rate = float(get_scene()->r.frs_sec) / float(get_scene()->r.frs_sec_base); return frame_number / frame_rate; } |