Skip to content

Commit a4c1804

Browse files
committed
Merge pull request godotengine#97483 from akien-mga/clang-format-19.1.0
CI: Update `clang-format` pre-commit hook to 19.1.0
2 parents b64b464 + c92a6c7 commit a4c1804

File tree

14 files changed

+17
-17
lines changed

14 files changed

+17
-17
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ exclude: |
99
1010
repos:
1111
- repo: https://github.com/pre-commit/mirrors-clang-format
12-
rev: v18.1.8
12+
rev: v19.1.0
1313
hooks:
1414
- id: clang-format
1515
files: \.(c|h|cpp|hpp|cc|hh|cxx|hxx|m|mm|inc|java|glsl)$

core/math/convex_hull.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class ConvexHullInternal {
204204
static Int128 mul(uint64_t a, uint64_t b);
205205

206206
Int128 operator-() const {
207-
return Int128((uint64_t) - (int64_t)low, ~high + (low == 0));
207+
return Int128(uint64_t(-int64_t(low)), ~high + (low == 0));
208208
}
209209

210210
Int128 operator+(const Int128 &b) const {

drivers/d3d12/rendering_device_driver_d3d12.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3244,7 +3244,7 @@ Vector<uint8_t> RenderingDeviceDriverD3D12::shader_compile_binary_from_spirv(Vec
32443244
DEV_ASSERT(binding_info.res_class == (uint32_t)RES_CLASS_INVALID || binding_info.res_class == (uint32_t)res_class);
32453245
binding_info.res_class = res_class;
32463246
} else if (p_dxil_type == DXIL_RES_SAMPLER) {
3247-
binding_info.has_sampler = (uint32_t) true;
3247+
binding_info.has_sampler = (uint32_t)true;
32483248
} else {
32493249
CRASH_NOW();
32503250
}

drivers/metal/metal_objects.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ vertex VaryingsPos vertClear(AttributesPos attributes [[stage_in]], constant Cle
12121212
return varyings;
12131213
}
12141214
)",
1215-
ClearAttKey::DEPTH_INDEX];
1215+
ClearAttKey::DEPTH_INDEX];
12161216

12171217
return new_func(msl, @"vertClear", nil);
12181218
}

drivers/vulkan/rendering_context_driver_vulkan.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class RenderingContextDriverVulkan : public RenderingContextDriver {
169169
static VkAllocationCallbacks *get_allocation_callbacks(VkObjectType p_type);
170170

171171
#if defined(VK_TRACK_DRIVER_MEMORY) || defined(VK_TRACK_DEVICE_MEMORY)
172-
enum VkTrackedObjectType{
172+
enum VkTrackedObjectType {
173173
VK_TRACKED_OBJECT_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_COMMAND_POOL + 1,
174174
VK_TRACKED_OBJECT_TYPE_SURFACE,
175175
VK_TRACKED_OBJECT_TYPE_SWAPCHAIN,
@@ -180,7 +180,7 @@ class RenderingContextDriverVulkan : public RenderingContextDriver {
180180
VK_TRACKED_OBJECT_TYPE_COUNT
181181
};
182182

183-
enum VkTrackedSystemAllocationScope{
183+
enum VkTrackedSystemAllocationScope {
184184
VK_TRACKED_SYSTEM_ALLOCATION_SCOPE_COUNT = VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE + 1
185185
};
186186
#endif

drivers/xaudio2/audio_driver_xaudio2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ Error AudioDriverXAudio2::init() {
4848
int latency = Engine::get_singleton()->get_audio_output_latency();
4949
buffer_size = closest_power_of_2(latency * mix_rate / 1000);
5050

51-
samples_in = memnew_arr(int32_t, buffer_size * channels);
51+
samples_in = memnew_arr(int32_t, size_t(buffer_size) * channels);
5252
for (int i = 0; i < AUDIO_BUFFERS; i++) {
53-
samples_out[i] = memnew_arr(int16_t, buffer_size * channels);
53+
samples_out[i] = memnew_arr(int16_t, size_t(buffer_size) * channels);
5454
xaudio_buffer[i].AudioBytes = buffer_size * channels * sizeof(int16_t);
5555
xaudio_buffer[i].pAudioData = (const BYTE *)(samples_out[i]);
5656
xaudio_buffer[i].Flags = 0;

modules/lightmapper_rd/lm_compute.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ void trace_direct_light(vec3 p_position, vec3 p_normal, uint p_light_index, bool
485485

486486
float a = randomize(r_noise) * 2.0 * PI;
487487
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.
488-
vec2 light_disk_sample = (get_vogel_disk(vogel_index, a, shadowing_ray_count_sqrt)) * soft_shadowing_disk_size * light_data.shadow_blur;
488+
vec2 light_disk_sample = get_vogel_disk(vogel_index, a, shadowing_ray_count_sqrt) * soft_shadowing_disk_size * light_data.shadow_blur;
489489
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);
490490
// Offset the ray origin for AA, offset the light position for soft shadows.
491491
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) {

modules/mono/mono_gd/gd_mono.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ godot_plugins_initialize_fn initialize_hostfxr_and_godot_plugins(bool &r_runtime
388388
String assembly_name = path::get_csharp_project_name();
389389

390390
HostFxrCharString assembly_path = str_to_hostfxr(GodotSharpDirs::get_api_assemblies_dir()
391-
.path_join(assembly_name + ".dll"));
391+
.path_join(assembly_name + ".dll"));
392392

393393
load_assembly_and_get_function_pointer_fn load_assembly_and_get_function_pointer =
394394
initialize_hostfxr_self_contained(get_data(assembly_path));

platform/android/api/java_class_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class JavaClass : public RefCounted {
4747
GDCLASS(JavaClass, RefCounted);
4848

4949
#ifdef ANDROID_ENABLED
50-
enum ArgumentType{
50+
enum ArgumentType {
5151
ARG_TYPE_VOID,
5252
ARG_TYPE_BOOLEAN,
5353
ARG_TYPE_BYTE,

platform/linuxbsd/wayland/wayland_thread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ class WaylandThread {
665665
.preferred_buffer_transform = _wl_surface_on_preferred_buffer_transform,
666666
};
667667

668-
static constexpr struct wl_callback_listener frame_wl_callback_listener {
668+
static constexpr struct wl_callback_listener frame_wl_callback_listener = {
669669
.done = _frame_wl_callback_on_done,
670670
};
671671

@@ -683,7 +683,7 @@ class WaylandThread {
683683
.name = _wl_seat_on_name,
684684
};
685685

686-
static constexpr struct wl_callback_listener cursor_frame_callback_listener {
686+
static constexpr struct wl_callback_listener cursor_frame_callback_listener = {
687687
.done = _cursor_frame_callback_on_done,
688688
};
689689

0 commit comments

Comments
 (0)