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:
authorCampbell Barton <campbell@blender.org>2022-09-25 11:33:28 +0300
committerCampbell Barton <campbell@blender.org>2022-09-25 13:17:08 +0300
commitf68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch)
tree2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/blenkernel/intern/image_gpu.cc
parentc7b247a118e302a3afc6473797e53b6af28b69e2 (diff)
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/blenkernel/intern/image_gpu.cc')
-rw-r--r--source/blender/blenkernel/intern/image_gpu.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image_gpu.cc b/source/blender/blenkernel/intern/image_gpu.cc
index 08fdd715512..6893a50638a 100644
--- a/source/blender/blenkernel/intern/image_gpu.cc
+++ b/source/blender/blenkernel/intern/image_gpu.cc
@@ -551,7 +551,7 @@ void BKE_image_free_anim_gputextures(Main *bmain)
void BKE_image_free_old_gputextures(Main *bmain)
{
static int lasttime = 0;
- int ctime = (int)PIL_check_seconds_timer();
+ int ctime = int(PIL_check_seconds_timer());
/*
* Run garbage collector once for every collecting period of time
@@ -602,8 +602,8 @@ static ImBuf *update_do_scale(uchar *rect,
int full_h)
{
/* Partial update with scaling. */
- float xratio = limit_w / (float)full_w;
- float yratio = limit_h / (float)full_h;
+ float xratio = limit_w / float(full_w);
+ float yratio = limit_h / float(full_h);
int part_w = *w, part_h = *h;
@@ -611,8 +611,8 @@ static ImBuf *update_do_scale(uchar *rect,
* losing 1 pixel due to rounding errors in x,y. */
*x *= xratio;
*y *= yratio;
- *w = (int)ceil(xratio * (*w));
- *h = (int)ceil(yratio * (*h));
+ *w = int(ceil(xratio * (*w)));
+ *h = int(ceil(yratio * (*h)));
/* ...but take back if we are over the limit! */
if (*x + *w > limit_w) {