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/render/intern/texture_margin.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/render/intern/texture_margin.cc')
-rw-r--r-- | source/blender/render/intern/texture_margin.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc index dda9999b843..201908234fe 100644 --- a/source/blender/render/intern/texture_margin.cc +++ b/source/blender/render/intern/texture_margin.cc @@ -245,8 +245,8 @@ class TextureMarginMap { for (int i = 0; i < maxPolygonSteps; i++) { /* Force to pixel grid. */ - int nx = (int)round(destX); - int ny = (int)round(destY); + int nx = int(round(destX)); + int ny = int(round(destY)); uint32_t polygon_from_map = get_pixel(nx, ny); if (other_poly == polygon_from_map) { found_pixel_in_polygon = true; @@ -562,8 +562,8 @@ static void generate_margin(ImBuf *ibuf, * our intersection tests where a pixel gets in between 2 faces or the middle of a quad, * camera aligned quads also have this problem but they are less common. * Add a small offset to the UVs, fixes bug T18685. */ - vec[a][0] = (uv[0] - uv_offset[0]) * (float)ibuf->x - (0.5f + 0.001f); - vec[a][1] = (uv[1] - uv_offset[1]) * (float)ibuf->y - (0.5f + 0.002f); + vec[a][0] = (uv[0] - uv_offset[0]) * float(ibuf->x) - (0.5f + 0.001f); + vec[a][1] = (uv[1] - uv_offset[1]) * float(ibuf->y) - (0.5f + 0.002f); } /* NOTE: we need the top bit for the dijkstra distance map. */ |