Fix more issues found by cppcheck.

This commit is contained in:
bruvzg 2022-04-07 13:23:40 +03:00
parent f4b0c7a1ea
commit de4c97758a
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
63 changed files with 261 additions and 268 deletions

View file

@ -290,7 +290,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
{
uint8_t *tw = texdata.ptrw();
float *twf = (float *)tw;
float *twf = reinterpret_cast<float *>(tw);
for (int i = 0; i < vpc; i++) {
twf[i * 2 + 0] = valid_positions[i].x;
twf[i * 2 + 1] = valid_positions[i].y;
@ -334,7 +334,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
{
uint8_t *tw = normdata.ptrw();
float *twf = (float *)tw;
float *twf = reinterpret_cast<float *>(tw);
for (int i = 0; i < vpc; i++) {
twf[i * 2 + 0] = valid_normals[i].x;
twf[i * 2 + 1] = valid_normals[i].y;