mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
CI: Update clang-format
pre-commit hook to 19.1.0
This commit is contained in:
parent
f7c567e2f5
commit
c92a6c7e27
@ -9,7 +9,7 @@ exclude: |
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v18.1.8
|
||||
rev: v19.1.0
|
||||
hooks:
|
||||
- id: clang-format
|
||||
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$
|
||||
|
@ -204,7 +204,7 @@ public:
|
||||
static Int128 mul(uint64_t a, uint64_t b);
|
||||
|
||||
Int128 operator-() const {
|
||||
return Int128((uint64_t) - (int64_t)low, ~high + (low == 0));
|
||||
return Int128(uint64_t(-int64_t(low)), ~high + (low == 0));
|
||||
}
|
||||
|
||||
Int128 operator+(const Int128 &b) const {
|
||||
|
@ -48,9 +48,9 @@ Error AudioDriverXAudio2::init() {
|
||||
int latency = Engine::get_singleton()->get_audio_output_latency();
|
||||
buffer_size = closest_power_of_2(latency * mix_rate / 1000);
|
||||
|
||||
samples_in = memnew_arr(int32_t, buffer_size * channels);
|
||||
samples_in = memnew_arr(int32_t, size_t(buffer_size) * channels);
|
||||
for (int i = 0; i < AUDIO_BUFFERS; i++) {
|
||||
samples_out[i] = memnew_arr(int16_t, buffer_size * channels);
|
||||
samples_out[i] = memnew_arr(int16_t, size_t(buffer_size) * channels);
|
||||
xaudio_buffer[i].AudioBytes = buffer_size * channels * sizeof(int16_t);
|
||||
xaudio_buffer[i].pAudioData = (const BYTE *)(samples_out[i]);
|
||||
xaudio_buffer[i].Flags = 0;
|
||||
|
@ -485,7 +485,7 @@ void trace_direct_light(vec3 p_position, vec3 p_normal, uint p_light_index, bool
|
||||
|
||||
float a = randomize(r_noise) * 2.0 * PI;
|
||||
float vogel_index = float(total_ray_count - 1 - (i * shadowing_ray_count + j)); // Start from (total_ray_count - 1) so we check the outer points first.
|
||||
vec2 light_disk_sample = (get_vogel_disk(vogel_index, a, shadowing_ray_count_sqrt)) * soft_shadowing_disk_size * light_data.shadow_blur;
|
||||
vec2 light_disk_sample = get_vogel_disk(vogel_index, a, shadowing_ray_count_sqrt) * soft_shadowing_disk_size * light_data.shadow_blur;
|
||||
vec3 light_disk_to_point = normalize(light_to_point + light_disk_sample.x * light_to_point_tan + light_disk_sample.y * light_to_point_bitan);
|
||||
// Offset the ray origin for AA, offset the light position for soft shadows.
|
||||
if (trace_ray_any_hit(origin - light_disk_to_point * (bake_params.bias + length(disk_sample)), p_position - light_disk_to_point * dist) == RAY_MISS) {
|
||||
|
@ -665,7 +665,7 @@ private:
|
||||
.preferred_buffer_transform = _wl_surface_on_preferred_buffer_transform,
|
||||
};
|
||||
|
||||
static constexpr struct wl_callback_listener frame_wl_callback_listener {
|
||||
static constexpr struct wl_callback_listener frame_wl_callback_listener = {
|
||||
.done = _frame_wl_callback_on_done,
|
||||
};
|
||||
|
||||
@ -683,7 +683,7 @@ private:
|
||||
.name = _wl_seat_on_name,
|
||||
};
|
||||
|
||||
static constexpr struct wl_callback_listener cursor_frame_callback_listener {
|
||||
static constexpr struct wl_callback_listener cursor_frame_callback_listener = {
|
||||
.done = _cursor_frame_callback_on_done,
|
||||
};
|
||||
|
||||
|
@ -472,7 +472,7 @@ double ScrollBar::get_area_size() const {
|
||||
}
|
||||
|
||||
double ScrollBar::get_grabber_offset() const {
|
||||
return (get_area_size()) * get_as_ratio();
|
||||
return get_area_size() * get_as_ratio();
|
||||
}
|
||||
|
||||
Size2 ScrollBar::get_minimum_size() const {
|
||||
|
@ -45,7 +45,7 @@ Error AudioDriverDummy::init() {
|
||||
}
|
||||
|
||||
channels = get_channels();
|
||||
samples_in = memnew_arr(int32_t, (size_t)buffer_frames * channels);
|
||||
samples_in = memnew_arr(int32_t, size_t(buffer_frames) * channels);
|
||||
|
||||
if (use_threads) {
|
||||
thread.start(AudioDriverDummy::thread_func, this);
|
||||
|
Loading…
Reference in New Issue
Block a user