diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/compositor/operations/COM_MovieDistortionOperation.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/compositor/operations/COM_MovieDistortionOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieDistortionOperation.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc index ea3aad20792..b89a48f2a39 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc @@ -81,10 +81,10 @@ void MovieDistortionOperation::execute_pixel_sampled(float output[4], if (distortion_ != nullptr) { /* float overscan = 0.0f; */ const float pixel_aspect = pixel_aspect_; - const float w = (float)this->get_width() /* / (1 + overscan) */; - const float h = (float)this->get_height() /* / (1 + overscan) */; - const float aspx = w / (float)calibration_width_; - const float aspy = h / (float)calibration_height_; + const float w = float(this->get_width()) /* / (1 + overscan) */; + const float h = float(this->get_height()) /* / (1 + overscan) */; + const float aspx = w / float(calibration_width_); + const float aspy = h / float(calibration_height_); float in[2]; float out[2]; @@ -143,10 +143,10 @@ void MovieDistortionOperation::update_memory_buffer_partial(MemoryBuffer *output /* `float overscan = 0.0f;` */ const float pixel_aspect = pixel_aspect_; - const float w = (float)this->get_width() /* `/ (1 + overscan)` */; - const float h = (float)this->get_height() /* `/ (1 + overscan)` */; - const float aspx = w / (float)calibration_width_; - const float aspy = h / (float)calibration_height_; + const float w = float(this->get_width()) /* `/ (1 + overscan)` */; + const float h = float(this->get_height()) /* `/ (1 + overscan)` */; + const float aspx = w / float(calibration_width_); + const float aspy = h / float(calibration_height_); float xy[2]; float distorted_xy[2]; for (BuffersIterator<float> it = output->iterate_with({}, area); !it.is_end(); ++it) { |