mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Fix more issues found by cppcheck.
This commit is contained in:
parent
f4b0c7a1ea
commit
de4c97758a
63 changed files with 261 additions and 268 deletions
|
@ -354,7 +354,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
|
|||
uint8_t *iw = point_img.ptrw();
|
||||
memset(iw, 0, w * h * 3 * sizeof(float));
|
||||
const Vector3 *r = points.ptr();
|
||||
float *wf = (float *)iw;
|
||||
float *wf = reinterpret_cast<float *>(iw);
|
||||
for (int i = 0; i < point_count; i++) {
|
||||
wf[i * 3 + 0] = r[i].x;
|
||||
wf[i * 3 + 1] = r[i].y;
|
||||
|
@ -383,7 +383,7 @@ void GPUParticles3DEditor::_generate_emission_points() {
|
|||
uint8_t *iw = point_img2.ptrw();
|
||||
memset(iw, 0, w * h * 3 * sizeof(float));
|
||||
const Vector3 *r = normals.ptr();
|
||||
float *wf = (float *)iw;
|
||||
float *wf = reinterpret_cast<float *>(iw);
|
||||
for (int i = 0; i < point_count; i++) {
|
||||
wf[i * 3 + 0] = r[i].x;
|
||||
wf[i * 3 + 1] = r[i].y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue