diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-26 10:38:25 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-26 10:58:36 +0300 |
commit | 333e41eac6daf60c6aa9df0496a39c57d74b9c87 (patch) | |
tree | 5986e980fd64bc4ef1c3dda125a0f9dca4bab2c8 /source/blender/draw/intern/draw_pass.hh | |
parent | 0210c4df1793799a09a35e44be286dfca88769dc (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Use function style casts in C++ headers & source.
Diffstat (limited to 'source/blender/draw/intern/draw_pass.hh')
-rw-r--r-- | source/blender/draw/intern/draw_pass.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_pass.hh b/source/blender/draw/intern/draw_pass.hh index e1a0a6652ac..ee2180712d1 100644 --- a/source/blender/draw/intern/draw_pass.hh +++ b/source/blender/draw/intern/draw_pass.hh @@ -403,7 +403,7 @@ class PassSortable : public PassMain { { int64_t index = sub_passes_.append_and_get_index( PassBase(name, draw_commands_buf_, sub_passes_, shader_)); - headers_.append({Type::SubPass, static_cast<uint>(index)}); + headers_.append({Type::SubPass, uint(index)}); sorting_values_.append(sorting_value); return sub_passes_[index]; } @@ -442,7 +442,7 @@ namespace detail { template<class T> inline command::Undetermined &PassBase<T>::create_command(command::Type type) { int64_t index = commands_.append_and_get_index({}); - headers_.append({type, static_cast<uint>(index)}); + headers_.append({type, uint(index)}); return commands_[index]; } @@ -452,7 +452,7 @@ inline void PassBase<T>::clear(eGPUFrameBufferBits planes, float depth, uint8_t stencil) { - create_command(command::Type::Clear).clear = {(uint8_t)planes, stencil, depth, color}; + create_command(command::Type::Clear).clear = {uint8_t(planes), stencil, depth, color}; } template<class T> inline GPUBatch *PassBase<T>::procedural_batch_get(GPUPrimType primitive) @@ -477,7 +477,7 @@ template<class T> inline PassBase<T> &PassBase<T>::sub(const char *name) { int64_t index = sub_passes_.append_and_get_index( PassBase(name, draw_commands_buf_, sub_passes_, shader_)); - headers_.append({command::Type::SubPass, static_cast<uint>(index)}); + headers_.append({command::Type::SubPass, uint(index)}); return sub_passes_[index]; } |