summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/renderer_storage_rd.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-04-06 15:47:20 +0200
committerGitHub <noreply@github.com>2022-04-06 15:47:20 +0200
commitac591d9904e4e5cf7841b3e79caabf558d37db0e (patch)
tree70f3bd487e91feb4ca777dba214a09b17041da97 /servers/rendering/renderer_rd/renderer_storage_rd.cpp
parent72407a9cfbd4f58102972c0910429f3ab7006f07 (diff)
parentf851c4aa330e1064a66db50be62db2466f4fb768 (diff)
Merge pull request #59911 from bruvzg/cppcheck_fixes
Diffstat (limited to 'servers/rendering/renderer_rd/renderer_storage_rd.cpp')
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 499cb545c7..72f98a4690 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -421,7 +421,7 @@ void RendererStorageRD::_particles_allocate_emission_buffer(Particles *particles
particles->emission_buffer_data.resize(sizeof(ParticleEmissionBuffer::Data) * particles->amount + sizeof(uint32_t) * 4);
memset(particles->emission_buffer_data.ptrw(), 0, particles->emission_buffer_data.size());
- particles->emission_buffer = (ParticleEmissionBuffer *)particles->emission_buffer_data.ptrw();
+ particles->emission_buffer = reinterpret_cast<ParticleEmissionBuffer *>(particles->emission_buffer_data.ptrw());
particles->emission_buffer->particle_max = particles->amount;
particles->emission_storage_buffer = RD::get_singleton()->storage_buffer_create(particles->emission_buffer_data.size(), particles->emission_buffer_data);
@@ -997,9 +997,9 @@ void RendererStorageRD::_particles_process(Particles *p_particles, double p_delt
RD::get_singleton()->buffer_update(p_particles->frame_params_buffer, 0, sizeof(ParticlesFrameParams) * p_particles->trail_params.size(), p_particles->trail_params.ptr());
- ParticlesMaterialData *m = (ParticlesMaterialData *)material_storage->material_get_data(p_particles->process_material, RendererRD::SHADER_TYPE_PARTICLES);
+ ParticlesMaterialData *m = static_cast<ParticlesMaterialData *>(material_storage->material_get_data(p_particles->process_material, RendererRD::SHADER_TYPE_PARTICLES));
if (!m) {
- m = (ParticlesMaterialData *)material_storage->material_get_data(particles_shader.default_material, RendererRD::SHADER_TYPE_PARTICLES);
+ m = static_cast<ParticlesMaterialData *>(material_storage->material_get_data(particles_shader.default_material, RendererRD::SHADER_TYPE_PARTICLES));
}
ERR_FAIL_COND(!m);
@@ -4098,7 +4098,7 @@ void process() {
material_storage->material_initialize(particles_shader.default_material);
material_storage->material_set_shader(particles_shader.default_material, particles_shader.default_shader);
- ParticlesMaterialData *md = (ParticlesMaterialData *)material_storage->material_get_data(particles_shader.default_material, RendererRD::SHADER_TYPE_PARTICLES);
+ ParticlesMaterialData *md = static_cast<ParticlesMaterialData *>(material_storage->material_get_data(particles_shader.default_material, RendererRD::SHADER_TYPE_PARTICLES));
particles_shader.default_shader_rd = particles_shader.shader.version_get_shader(md->shader_data->version, 0);
Vector<RD::Uniform> uniforms;