From 21d77a417e17ac92bfc10dbd742c867d4019ce69 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Sep 2022 20:27:46 +1000 Subject: Cleanup: replace C-style casts with functional casts for numeric types Some changes missed from f68cfd6bb078482c4a779a6e26a56e2734edb5b8. --- source/blender/gpu/intern/gpu_matrix.cc | 2 +- source/blender/gpu/intern/gpu_vertex_buffer.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/intern/gpu_matrix.cc b/source/blender/gpu/intern/gpu_matrix.cc index 12bbe13a296..b46860cf0f4 100644 --- a/source/blender/gpu/intern/gpu_matrix.cc +++ b/source/blender/gpu/intern/gpu_matrix.cc @@ -700,7 +700,7 @@ float GPU_polygon_offset_calc(const float (*winmat)[4], float viewdist, float di if (depth_fac == 0.0f) { /* Hard-code for 24 bit precision. */ int depthbits = 24; - depth_fac = 1.0f / (float)((1 << depthbits) - 1); + depth_fac = 1.0f / float((1 << depthbits) - 1); } ofs = (-1.0 / winmat[2][2]) * dist * depth_fac; diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.cc b/source/blender/gpu/intern/gpu_vertex_buffer.cc index a441cfe2fb8..abf5d2dc4c0 100644 --- a/source/blender/gpu/intern/gpu_vertex_buffer.cc +++ b/source/blender/gpu/intern/gpu_vertex_buffer.cc @@ -278,7 +278,7 @@ void GPU_vertbuf_attr_get_raw_data(GPUVertBuf *verts_, uint a_idx, GPUVertBufRaw access->data = (uchar *)verts->data + a->offset; access->data_init = access->data; #ifdef DEBUG - access->_data_end = access->data_init + (size_t)(verts->vertex_alloc * format->stride); + access->_data_end = access->data_init + size_t(verts->vertex_alloc * format->stride); #endif } -- cgit v1.2.3