mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 09:23:40 +00:00
Fix some LGTM errors of "Multiplication result converted to larger type"
This commit is contained in:
parent
f9aec342dc
commit
7e51e4cb84
12 changed files with 25 additions and 23 deletions
|
@ -117,14 +117,15 @@ Error AudioDriverJavaScript::init() {
|
|||
if (output_rb) {
|
||||
memdelete_arr(output_rb);
|
||||
}
|
||||
output_rb = memnew_arr(float, buffer_length *channel_count);
|
||||
const size_t array_size = buffer_length * (size_t)channel_count;
|
||||
output_rb = memnew_arr(float, array_size);
|
||||
if (!output_rb) {
|
||||
return ERR_OUT_OF_MEMORY;
|
||||
}
|
||||
if (input_rb) {
|
||||
memdelete_arr(input_rb);
|
||||
}
|
||||
input_rb = memnew_arr(float, buffer_length *channel_count);
|
||||
input_rb = memnew_arr(float, array_size);
|
||||
if (!input_rb) {
|
||||
return ERR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue