From b37fc1014abf7adda70dc30b0822d775b3a4433f Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Wed, 26 Jun 2024 11:13:05 -0500 Subject: [PATCH] Style: Apply new `clang-format` changes --- drivers/gles3/shaders/sky.glsl | 2 - .../storage/render_scene_buffers_gles3.h | 6 +-- drivers/gles3/storage/texture_storage.h | 2 +- editor/editor_resource_preview.h | 2 +- editor/export/editor_export_platform.h | 2 +- editor/gui/editor_title_bar.h | 2 +- .../plugins/animation_state_machine_editor.h | 2 +- editor/plugins/font_config_plugin.h | 12 ++--- .../plugins/gpu_particles_3d_editor_plugin.h | 2 +- editor/plugins/text_editor.h | 4 +- editor/plugins/tiles/tile_data_editors.cpp | 2 +- editor/plugins/tiles/tile_data_editors.h | 12 ++--- editor/plugins/tiles/tile_map_layer_editor.h | 6 +-- .../language_server/gdscript_extend_parser.h | 4 +- modules/navigation/nav_base.h | 2 +- modules/text_server_adv/text_server_adv.h | 2 +- modules/text_server_fb/text_server_fb.h | 2 +- .../godotengine/godot/plugin/SignalInfo.java | 2 +- platform/linuxbsd/export/export_plugin.h | 2 +- platform/linuxbsd/joypad_linux.cpp | 2 +- platform/linuxbsd/wayland/key_mapping_xkb.h | 2 +- platform/linuxbsd/x11/gl_manager_x11_egl.h | 4 +- platform/macos/export/export_plugin.h | 2 +- platform/windows/display_server_windows.cpp | 2 +- platform/windows/export/export_plugin.h | 2 +- platform/windows/gl_manager_windows_angle.h | 4 +- scene/2d/tile_map_layer.h | 2 +- scene/gui/color_mode.h | 14 +++--- scene/resources/2d/tile_set.h | 38 +++++++-------- scene/resources/3d/primitive_meshes.h | 6 +-- scene/resources/camera_attributes.h | 2 +- .../dummy/storage/material_storage.h | 2 +- .../rendering/dummy/storage/texture_storage.h | 48 +++++++++---------- .../rendering/renderer_rd/environment/fog.h | 4 +- .../rendering/renderer_rd/environment/gi.h | 4 +- .../forward_mobile/render_forward_mobile.h | 10 ++-- .../renderer_rd/renderer_scene_render_rd.h | 6 +-- servers/rendering/renderer_rd/shader_rd.h | 2 +- .../rendering/renderer_rd/shaders/canvas.glsl | 12 ++--- .../renderer_rd/shaders/environment/sky.glsl | 6 +-- .../shaders/environment/volumetric_fog.glsl | 4 +- .../scene_forward_clustered.glsl | 10 ++-- .../forward_mobile/scene_forward_mobile.glsl | 12 ++--- .../renderer_rd/shaders/particles.glsl | 6 +-- .../rendering/renderer_scene_occlusion_cull.h | 2 +- servers/rendering/rendering_device_commons.h | 2 +- servers/rendering/storage/material_storage.h | 2 +- .../rendering/storage/render_scene_buffers.h | 8 ++-- servers/rendering/storage/texture_storage.h | 2 +- servers/xr/xr_controller_tracker.cpp | 2 +- servers/xr/xr_interface.h | 4 +- 51 files changed, 150 insertions(+), 148 deletions(-) diff --git a/drivers/gles3/shaders/sky.glsl b/drivers/gles3/shaders/sky.glsl index f734e4b3554..186b630bc85 100644 --- a/drivers/gles3/shaders/sky.glsl +++ b/drivers/gles3/shaders/sky.glsl @@ -212,9 +212,7 @@ void main() { #endif { - #CODE : SKY - } color *= sky_energy_multiplier; diff --git a/drivers/gles3/storage/render_scene_buffers_gles3.h b/drivers/gles3/storage/render_scene_buffers_gles3.h index a7a676ad33e..9a2912f9780 100644 --- a/drivers/gles3/storage/render_scene_buffers_gles3.h +++ b/drivers/gles3/storage/render_scene_buffers_gles3.h @@ -103,9 +103,9 @@ public: virtual void configure(const RenderSceneBuffersConfiguration *p_config) override; void configure_for_probe(Size2i p_size); - virtual void set_fsr_sharpness(float p_fsr_sharpness) override{}; - virtual void set_texture_mipmap_bias(float p_texture_mipmap_bias) override{}; - virtual void set_use_debanding(bool p_use_debanding) override{}; + virtual void set_fsr_sharpness(float p_fsr_sharpness) override {} + virtual void set_texture_mipmap_bias(float p_texture_mipmap_bias) override {} + virtual void set_use_debanding(bool p_use_debanding) override {} void set_apply_color_adjustments_in_post(bool p_apply_in_post); void free_render_buffer_data(); diff --git a/drivers/gles3/storage/texture_storage.h b/drivers/gles3/storage/texture_storage.h index 26864c2f3b7..b1d46309788 100644 --- a/drivers/gles3/storage/texture_storage.h +++ b/drivers/gles3/storage/texture_storage.h @@ -582,7 +582,7 @@ public: virtual RID decal_allocate() override; virtual void decal_initialize(RID p_rid) override; - virtual void decal_free(RID p_rid) override{}; + virtual void decal_free(RID p_rid) override {} virtual void decal_set_size(RID p_decal, const Vector3 &p_size) override; virtual void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) override; diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h index 2870f9a2019..57b6e4cedb4 100644 --- a/editor/editor_resource_preview.h +++ b/editor/editor_resource_preview.h @@ -65,7 +65,7 @@ public: virtual bool handles(const String &p_type) const; virtual Ref generate(const Ref &p_from, const Size2 &p_size, Dictionary &p_metadata) const; virtual Ref generate_from_path(const String &p_path, const Size2 &p_size, Dictionary &p_metadata) const; - virtual void abort(){}; + virtual void abort() {} virtual bool generate_small_preview_automatically() const; virtual bool can_generate_small_preview() const; diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h index a800bb95e6d..95f21ceafb3 100644 --- a/editor/export/editor_export_platform.h +++ b/editor/export/editor_export_platform.h @@ -308,7 +308,7 @@ public: virtual Error export_pack(const Ref &p_preset, bool p_debug, const String &p_path, BitField p_flags = 0); virtual Error export_zip(const Ref &p_preset, bool p_debug, const String &p_path, BitField p_flags = 0); virtual void get_platform_features(List *r_features) const = 0; - virtual void resolve_platform_feature_priorities(const Ref &p_preset, HashSet &p_features){}; + virtual void resolve_platform_feature_priorities(const Ref &p_preset, HashSet &p_features) {} virtual String get_debug_protocol() const { return "tcp://"; } EditorExportPlatform(); diff --git a/editor/gui/editor_title_bar.h b/editor/gui/editor_title_bar.h index 4055476b820..13fd5d6cdbe 100644 --- a/editor/gui/editor_title_bar.h +++ b/editor/gui/editor_title_bar.h @@ -43,7 +43,7 @@ class EditorTitleBar : public HBoxContainer { protected: virtual void gui_input(const Ref &p_event) override; - static void _bind_methods(){}; + static void _bind_methods() {} public: void set_can_move_window(bool p_enabled); diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h index 860d0ed35d1..eb623a147d6 100644 --- a/editor/plugins/animation_state_machine_editor.h +++ b/editor/plugins/animation_state_machine_editor.h @@ -322,7 +322,7 @@ protected: public: void add_transition(const StringName &p_from, const StringName &p_to, Ref p_transition); - EditorAnimationMultiTransitionEdit(){}; + EditorAnimationMultiTransitionEdit() {} }; #endif // ANIMATION_STATE_MACHINE_EDITOR_H diff --git a/editor/plugins/font_config_plugin.h b/editor/plugins/font_config_plugin.h index e83f29a77b8..87fd3861dc9 100644 --- a/editor/plugins/font_config_plugin.h +++ b/editor/plugins/font_config_plugin.h @@ -51,7 +51,7 @@ public: void set_dict(const Dictionary &p_dict); Dictionary get_dict(); - EditorPropertyFontMetaObject(){}; + EditorPropertyFontMetaObject() {} }; /*************************************************************************/ @@ -75,7 +75,7 @@ public: void set_defaults(const Dictionary &p_dict); Dictionary get_defaults(); - EditorPropertyFontOTObject(){}; + EditorPropertyFontOTObject() {} }; /*************************************************************************/ @@ -103,7 +103,7 @@ class EditorPropertyFontMetaOverride : public EditorProperty { protected: void _notification(int p_what); - static void _bind_methods(){}; + static void _bind_methods() {} void _edit_pressed(); void _page_changed(int p_page); @@ -138,7 +138,7 @@ class EditorPropertyOTVariation : public EditorProperty { EditorPaginator *paginator = nullptr; protected: - static void _bind_methods(){}; + static void _bind_methods() {} void _edit_pressed(); void _page_changed(int p_page); @@ -187,7 +187,7 @@ class EditorPropertyOTFeatures : public EditorProperty { protected: void _notification(int p_what); - static void _bind_methods(){}; + static void _bind_methods() {} void _edit_pressed(); void _page_changed(int p_page); @@ -256,7 +256,7 @@ protected: virtual void _add_element() override; void _add_font(int p_option); - static void _bind_methods(){}; + static void _bind_methods() {} public: EditorPropertyFontNamesArray(); diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.h b/editor/plugins/gpu_particles_3d_editor_plugin.h index 5f59f6dca78..1295836b5f4 100644 --- a/editor/plugins/gpu_particles_3d_editor_plugin.h +++ b/editor/plugins/gpu_particles_3d_editor_plugin.h @@ -59,7 +59,7 @@ protected: Vector geometry; bool _generate(Vector &points, Vector &normals); - virtual void _generate_emission_points(){}; + virtual void _generate_emission_points() {} void _node_selected(const NodePath &p_path); public: diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 1acec4e9597..b6c203f2a28 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -127,8 +127,8 @@ public: virtual Variant get_navigation_state() override; virtual Vector get_functions() override; virtual PackedInt32Array get_breakpoints() override; - virtual void set_breakpoint(int p_line, bool p_enabled) override{}; - virtual void clear_breakpoints() override{}; + virtual void set_breakpoint(int p_line, bool p_enabled) override {} + virtual void clear_breakpoints() override {} virtual void goto_line(int p_line, int p_column = 0) override; void goto_line_selection(int p_line, int p_begin, int p_end); virtual void set_executing_line(int p_line) override; diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 79915012a88..12b9761fd2f 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -1097,7 +1097,7 @@ void TileDataDefaultEditor::forward_draw_over_atlas(TileAtlasView *p_tile_atlas_ } }; -void TileDataDefaultEditor::forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_set_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform){ +void TileDataDefaultEditor::forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_set_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) { }; diff --git a/editor/plugins/tiles/tile_data_editors.h b/editor/plugins/tiles/tile_data_editors.h index 9b1eadf3317..1426bb4c2f4 100644 --- a/editor/plugins/tiles/tile_data_editors.h +++ b/editor/plugins/tiles/tile_data_editors.h @@ -54,7 +54,7 @@ private: protected: Ref tile_set; TileData *_get_tile_data(TileMapCell p_cell); - virtual void _tile_set_changed(){}; + virtual void _tile_set_changed() {} static void _bind_methods(); @@ -63,13 +63,13 @@ public: // Input to handle painting. virtual Control *get_toolbar() { return nullptr; }; - virtual void forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform){}; - virtual void forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform){}; - virtual void forward_painting_atlas_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref &p_event){}; - virtual void forward_painting_alternatives_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref &p_event){}; + virtual void forward_draw_over_atlas(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) {} + virtual void forward_draw_over_alternatives(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, CanvasItem *p_canvas_item, Transform2D p_transform) {} + virtual void forward_painting_atlas_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref &p_event) {} + virtual void forward_painting_alternatives_gui_input(TileAtlasView *p_tile_atlas_view, TileSetAtlasSource *p_tile_atlas_source, const Ref &p_event) {} // Used to draw the tile data property value over a tile. - virtual void draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected = false){}; + virtual void draw_over_tile(CanvasItem *p_canvas_item, Transform2D p_transform, TileMapCell p_cell, bool p_selected = false) {} }; class DummyObject : public Object { diff --git a/editor/plugins/tiles/tile_map_layer_editor.h b/editor/plugins/tiles/tile_map_layer_editor.h index 7d749be1bac..805af7b58ed 100644 --- a/editor/plugins/tiles/tile_map_layer_editor.h +++ b/editor/plugins/tiles/tile_map_layer_editor.h @@ -66,9 +66,9 @@ public: }; virtual bool forward_canvas_gui_input(const Ref &p_event) { return false; }; - virtual void forward_canvas_draw_over_viewport(Control *p_overlay){}; - virtual void tile_set_changed(){}; - virtual void edit(ObjectID p_tile_map_layer_id){}; + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) {} + virtual void tile_set_changed() {} + virtual void edit(ObjectID p_tile_map_layer_id) {} }; class TileMapLayerEditorTilesPlugin : public TileMapLayerSubEditorPlugin { diff --git a/modules/gdscript/language_server/gdscript_extend_parser.h b/modules/gdscript/language_server/gdscript_extend_parser.h index a808f19e5b5..239f7d9f43f 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.h +++ b/modules/gdscript/language_server/gdscript_extend_parser.h @@ -37,10 +37,10 @@ #include "core/variant/variant.h" #ifndef LINE_NUMBER_TO_INDEX -#define LINE_NUMBER_TO_INDEX(p_line) ((p_line)-1) +#define LINE_NUMBER_TO_INDEX(p_line) ((p_line) - 1) #endif #ifndef COLUMN_NUMBER_TO_INDEX -#define COLUMN_NUMBER_TO_INDEX(p_column) ((p_column)-1) +#define COLUMN_NUMBER_TO_INDEX(p_column) ((p_column) - 1) #endif #ifndef SYMBOL_SEPERATOR diff --git a/modules/navigation/nav_base.h b/modules/navigation/nav_base.h index c28392acf73..d2308abfaf7 100644 --- a/modules/navigation/nav_base.h +++ b/modules/navigation/nav_base.h @@ -64,7 +64,7 @@ public: void set_owner_id(ObjectID p_owner_id) { owner_id = p_owner_id; } ObjectID get_owner_id() const { return owner_id; } - virtual ~NavBase(){}; + virtual ~NavBase() {} }; #endif // NAV_BASE_H diff --git a/modules/text_server_adv/text_server_adv.h b/modules/text_server_adv/text_server_adv.h index 448be9ebe4c..c63389b1c63 100644 --- a/modules/text_server_adv/text_server_adv.h +++ b/modules/text_server_adv/text_server_adv.h @@ -705,7 +705,7 @@ class TextServerAdvanced : public TextServerExtension { }; protected: - static void _bind_methods(){}; + static void _bind_methods() {} void full_copy(ShapedTextDataAdvanced *p_shaped); void invalidate(ShapedTextDataAdvanced *p_shaped, bool p_text = false); diff --git a/modules/text_server_fb/text_server_fb.h b/modules/text_server_fb/text_server_fb.h index ee1f72401f9..7f12ad593b6 100644 --- a/modules/text_server_fb/text_server_fb.h +++ b/modules/text_server_fb/text_server_fb.h @@ -574,7 +574,7 @@ class TextServerFallback : public TextServerExtension { Mutex ft_mutex; protected: - static void _bind_methods(){}; + static void _bind_methods() {} void full_copy(ShapedTextDataFallback *p_shaped); void invalidate(ShapedTextDataFallback *p_shaped); diff --git a/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java b/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java index 4a166112abe..be5a7a2962e 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java +++ b/platform/android/java/lib/src/org/godotengine/godot/plugin/SignalInfo.java @@ -50,7 +50,7 @@ public final class SignalInfo { } this.name = signalName; - this.paramTypes = paramTypes == null ? new Class[ 0 ] : paramTypes; + this.paramTypes = paramTypes == null ? new Class[0] : paramTypes; this.paramTypesNames = new String[this.paramTypes.length]; for (int i = 0; i < this.paramTypes.length; i++) { this.paramTypesNames[i] = this.paramTypes[i].getName(); diff --git a/platform/linuxbsd/export/export_plugin.h b/platform/linuxbsd/export/export_plugin.h index 1d9ef01d1a8..9e016bd4c3b 100644 --- a/platform/linuxbsd/export/export_plugin.h +++ b/platform/linuxbsd/export/export_plugin.h @@ -48,7 +48,7 @@ class EditorExportPlatformLinuxBSD : public EditorExportPlatformPC { String cmd_args; bool wait = false; - SSHCleanupCommand(){}; + SSHCleanupCommand() {} SSHCleanupCommand(const String &p_host, const String &p_port, const Vector &p_ssh_arg, const String &p_cmd_args, bool p_wait = false) { host = p_host; port = p_port; diff --git a/platform/linuxbsd/joypad_linux.cpp b/platform/linuxbsd/joypad_linux.cpp index a67428b9a48..49f2690e611 100644 --- a/platform/linuxbsd/joypad_linux.cpp +++ b/platform/linuxbsd/joypad_linux.cpp @@ -50,7 +50,7 @@ #define LONG_BITS (sizeof(long) * 8) #define test_bit(nr, addr) (((1UL << ((nr) % LONG_BITS)) & ((addr)[(nr) / LONG_BITS])) != 0) -#define NBITS(x) ((((x)-1) / LONG_BITS) + 1) +#define NBITS(x) ((((x) - 1) / LONG_BITS) + 1) #ifdef UDEV_ENABLED static const char *ignore_str = "/dev/input/js"; diff --git a/platform/linuxbsd/wayland/key_mapping_xkb.h b/platform/linuxbsd/wayland/key_mapping_xkb.h index 306a8f25b57..9b8c90a445e 100644 --- a/platform/linuxbsd/wayland/key_mapping_xkb.h +++ b/platform/linuxbsd/wayland/key_mapping_xkb.h @@ -51,7 +51,7 @@ class KeyMappingXKB { static inline HashMap scancode_map_inv; static inline HashMap location_map; - KeyMappingXKB(){}; + KeyMappingXKB() {} public: static void initialize(); diff --git a/platform/linuxbsd/x11/gl_manager_x11_egl.h b/platform/linuxbsd/x11/gl_manager_x11_egl.h index b9c96619c42..405dda3d836 100644 --- a/platform/linuxbsd/x11/gl_manager_x11_egl.h +++ b/platform/linuxbsd/x11/gl_manager_x11_egl.h @@ -52,8 +52,8 @@ private: public: void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {} - GLManagerEGL_X11(){}; - ~GLManagerEGL_X11(){}; + GLManagerEGL_X11() {} + ~GLManagerEGL_X11() {} }; #endif // X11_ENABLED && GLES3_ENABLED diff --git a/platform/macos/export/export_plugin.h b/platform/macos/export/export_plugin.h index 5457c687d39..d88d347359a 100644 --- a/platform/macos/export/export_plugin.h +++ b/platform/macos/export/export_plugin.h @@ -68,7 +68,7 @@ class EditorExportPlatformMacOS : public EditorExportPlatform { String cmd_args; bool wait = false; - SSHCleanupCommand(){}; + SSHCleanupCommand() {} SSHCleanupCommand(const String &p_host, const String &p_port, const Vector &p_ssh_arg, const String &p_cmd_args, bool p_wait = false) { host = p_host; port = p_port; diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 50ebe7077fd..a89dc38cd46 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -381,7 +381,7 @@ public: ctls[cid] = p_name; } - virtual ~FileDialogEventHandler(){}; + virtual ~FileDialogEventHandler() {} }; #if defined(__GNUC__) && !defined(__clang__) diff --git a/platform/windows/export/export_plugin.h b/platform/windows/export/export_plugin.h index e86aac83d44..1972b36845f 100644 --- a/platform/windows/export/export_plugin.h +++ b/platform/windows/export/export_plugin.h @@ -52,7 +52,7 @@ class EditorExportPlatformWindows : public EditorExportPlatformPC { String cmd_args; bool wait = false; - SSHCleanupCommand(){}; + SSHCleanupCommand() {} SSHCleanupCommand(const String &p_host, const String &p_port, const Vector &p_ssh_arg, const String &p_cmd_args, bool p_wait = false) { host = p_host; port = p_port; diff --git a/platform/windows/gl_manager_windows_angle.h b/platform/windows/gl_manager_windows_angle.h index f43a6fbe022..9c02912b86d 100644 --- a/platform/windows/gl_manager_windows_angle.h +++ b/platform/windows/gl_manager_windows_angle.h @@ -52,8 +52,8 @@ private: public: void window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height); - GLManagerANGLE_Windows(){}; - ~GLManagerANGLE_Windows(){}; + GLManagerANGLE_Windows() {} + ~GLManagerANGLE_Windows() {} }; #endif // WINDOWS_ENABLED && GLES3_ENABLED diff --git a/scene/2d/tile_map_layer.h b/scene/2d/tile_map_layer.h index cc0a5b49fb9..6cb481849c5 100644 --- a/scene/2d/tile_map_layer.h +++ b/scene/2d/tile_map_layer.h @@ -90,7 +90,7 @@ public: TerrainConstraint(Ref p_tile_set, const Vector2i &p_position, int p_terrain); // For the center terrain bit TerrainConstraint(Ref p_tile_set, const Vector2i &p_position, const TileSet::CellNeighbor &p_bit, int p_terrain); // For peering bits - TerrainConstraint(){}; + TerrainConstraint() {} }; #ifdef DEBUG_ENABLED diff --git a/scene/gui/color_mode.h b/scene/gui/color_mode.h index 84e9d4542df..94193ccf747 100644 --- a/scene/gui/color_mode.h +++ b/scene/gui/color_mode.h @@ -50,14 +50,14 @@ public: virtual Color get_color() const = 0; - virtual void _value_changed(){}; + virtual void _value_changed() {} virtual void slider_draw(int p_which) = 0; virtual bool apply_theme() const { return false; } virtual ColorPicker::PickerShapeType get_shape_override() const { return ColorPicker::SHAPE_MAX; } ColorMode(ColorPicker *p_color_picker); - virtual ~ColorMode(){}; + virtual ~ColorMode() {} }; class ColorModeHSV : public ColorMode { @@ -81,7 +81,7 @@ public: virtual void slider_draw(int p_which) override; ColorModeHSV(ColorPicker *p_color_picker) : - ColorMode(p_color_picker){}; + ColorMode(p_color_picker) {} }; class ColorModeRGB : public ColorMode { @@ -100,7 +100,7 @@ public: virtual void slider_draw(int p_which) override; ColorModeRGB(ColorPicker *p_color_picker) : - ColorMode(p_color_picker){}; + ColorMode(p_color_picker) {} }; class ColorModeRAW : public ColorMode { @@ -122,7 +122,7 @@ public: virtual bool apply_theme() const override; ColorModeRAW(ColorPicker *p_color_picker) : - ColorMode(p_color_picker){}; + ColorMode(p_color_picker) {} }; class ColorModeOKHSL : public ColorMode { @@ -147,9 +147,9 @@ public: virtual ColorPicker::PickerShapeType get_shape_override() const override { return ColorPicker::SHAPE_OKHSL_CIRCLE; } ColorModeOKHSL(ColorPicker *p_color_picker) : - ColorMode(p_color_picker){}; + ColorMode(p_color_picker) {} - ~ColorModeOKHSL(){}; + ~ColorModeOKHSL() {} }; #endif // COLOR_MODE_H diff --git a/scene/resources/2d/tile_set.h b/scene/resources/2d/tile_set.h index 931495d0208..15e1a16359e 100644 --- a/scene/resources/2d/tile_set.h +++ b/scene/resources/2d/tile_set.h @@ -571,25 +571,25 @@ public: // Not exposed. virtual void set_tile_set(const TileSet *p_tile_set); TileSet *get_tile_set() const; - virtual void notify_tile_data_properties_should_change(){}; - virtual void add_occlusion_layer(int p_index){}; - virtual void move_occlusion_layer(int p_from_index, int p_to_pos){}; - virtual void remove_occlusion_layer(int p_index){}; - virtual void add_physics_layer(int p_index){}; - virtual void move_physics_layer(int p_from_index, int p_to_pos){}; - virtual void remove_physics_layer(int p_index){}; - virtual void add_terrain_set(int p_index){}; - virtual void move_terrain_set(int p_from_index, int p_to_pos){}; - virtual void remove_terrain_set(int p_index){}; - virtual void add_terrain(int p_terrain_set, int p_index){}; - virtual void move_terrain(int p_terrain_set, int p_from_index, int p_to_pos){}; - virtual void remove_terrain(int p_terrain_set, int p_index){}; - virtual void add_navigation_layer(int p_index){}; - virtual void move_navigation_layer(int p_from_index, int p_to_pos){}; - virtual void remove_navigation_layer(int p_index){}; - virtual void add_custom_data_layer(int p_index){}; - virtual void move_custom_data_layer(int p_from_index, int p_to_pos){}; - virtual void remove_custom_data_layer(int p_index){}; + virtual void notify_tile_data_properties_should_change() {} + virtual void add_occlusion_layer(int p_index) {} + virtual void move_occlusion_layer(int p_from_index, int p_to_pos) {} + virtual void remove_occlusion_layer(int p_index) {} + virtual void add_physics_layer(int p_index) {} + virtual void move_physics_layer(int p_from_index, int p_to_pos) {} + virtual void remove_physics_layer(int p_index) {} + virtual void add_terrain_set(int p_index) {} + virtual void move_terrain_set(int p_from_index, int p_to_pos) {} + virtual void remove_terrain_set(int p_index) {} + virtual void add_terrain(int p_terrain_set, int p_index) {} + virtual void move_terrain(int p_terrain_set, int p_from_index, int p_to_pos) {} + virtual void remove_terrain(int p_terrain_set, int p_index) {} + virtual void add_navigation_layer(int p_index) {} + virtual void move_navigation_layer(int p_from_index, int p_to_pos) {} + virtual void remove_navigation_layer(int p_index) {} + virtual void add_custom_data_layer(int p_index) {} + virtual void move_custom_data_layer(int p_from_index, int p_to_pos) {} + virtual void remove_custom_data_layer(int p_index) {} virtual void reset_state() override; // Tiles. diff --git a/scene/resources/3d/primitive_meshes.h b/scene/resources/3d/primitive_meshes.h index fc2489923ab..85f46a482a3 100644 --- a/scene/resources/3d/primitive_meshes.h +++ b/scene/resources/3d/primitive_meshes.h @@ -77,7 +77,7 @@ protected: Vector2 get_uv2_scale(Vector2 p_margin_scale = Vector2(1.0, 1.0)) const; float get_lightmap_texel_size() const; - virtual void _update_lightmap_size(){}; + virtual void _update_lightmap_size() {} void _on_settings_changed(); @@ -541,7 +541,7 @@ private: Vector2 point; bool sharp = false; - ContourPoint(){}; + ContourPoint() {} ContourPoint(const Vector2 &p_pt, bool p_sharp) { point = p_pt; sharp = p_sharp; @@ -551,7 +551,7 @@ private: struct ContourInfo { real_t length = 0.0; bool ccw = true; - ContourInfo(){}; + ContourInfo() {} ContourInfo(real_t p_len, bool p_ccw) { length = p_len; ccw = p_ccw; diff --git a/scene/resources/camera_attributes.h b/scene/resources/camera_attributes.h index 0f819134e22..de57b0ce8fb 100644 --- a/scene/resources/camera_attributes.h +++ b/scene/resources/camera_attributes.h @@ -53,7 +53,7 @@ protected: float auto_exposure_max = 64.0; float auto_exposure_speed = 0.5; float auto_exposure_scale = 0.4; - virtual void _update_auto_exposure(){}; + virtual void _update_auto_exposure() {} public: virtual RID get_rid() const override; diff --git a/servers/rendering/dummy/storage/material_storage.h b/servers/rendering/dummy/storage/material_storage.h index 4a956cd25d0..e4c58474e25 100644 --- a/servers/rendering/dummy/storage/material_storage.h +++ b/servers/rendering/dummy/storage/material_storage.h @@ -97,7 +97,7 @@ public: /* MATERIAL API */ virtual RID material_allocate() override { return RID(); } virtual void material_initialize(RID p_rid) override {} - virtual void material_free(RID p_rid) override{}; + virtual void material_free(RID p_rid) override {} virtual void material_set_render_priority(RID p_material, int priority) override {} virtual void material_set_shader(RID p_shader_material, RID p_shader) override {} diff --git a/servers/rendering/dummy/storage/texture_storage.h b/servers/rendering/dummy/storage/texture_storage.h index 609f19589fd..1a566b518d9 100644 --- a/servers/rendering/dummy/storage/texture_storage.h +++ b/servers/rendering/dummy/storage/texture_storage.h @@ -56,14 +56,14 @@ public: /* Canvas Texture API */ virtual RID canvas_texture_allocate() override { return RID(); }; - virtual void canvas_texture_initialize(RID p_rid) override{}; - virtual void canvas_texture_free(RID p_rid) override{}; + virtual void canvas_texture_initialize(RID p_rid) override {} + virtual void canvas_texture_free(RID p_rid) override {} - virtual void canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) override{}; - virtual void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess) override{}; + virtual void canvas_texture_set_channel(RID p_canvas_texture, RS::CanvasTextureChannel p_channel, RID p_texture) override {} + virtual void canvas_texture_set_shading_parameters(RID p_canvas_texture, const Color &p_base_color, float p_shininess) override {} - virtual void canvas_texture_set_texture_filter(RID p_item, RS::CanvasItemTextureFilter p_filter) override{}; - virtual void canvas_texture_set_texture_repeat(RID p_item, RS::CanvasItemTextureRepeat p_repeat) override{}; + virtual void canvas_texture_set_texture_filter(RID p_item, RS::CanvasItemTextureFilter p_filter) override {} + virtual void canvas_texture_set_texture_repeat(RID p_item, RS::CanvasItemTextureRepeat p_repeat) override {} /* Texture API */ @@ -88,20 +88,20 @@ public: ERR_FAIL_NULL(t); t->image = p_image->duplicate(); }; - virtual void texture_2d_layered_initialize(RID p_texture, const Vector> &p_layers, RS::TextureLayeredType p_layered_type) override{}; - virtual void texture_3d_initialize(RID p_texture, Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector> &p_data) override{}; - virtual void texture_proxy_initialize(RID p_texture, RID p_base) override{}; //all slices, then all the mipmaps, must be coherent + virtual void texture_2d_layered_initialize(RID p_texture, const Vector> &p_layers, RS::TextureLayeredType p_layered_type) override {} + virtual void texture_3d_initialize(RID p_texture, Image::Format, int p_width, int p_height, int p_depth, bool p_mipmaps, const Vector> &p_data) override {} + virtual void texture_proxy_initialize(RID p_texture, RID p_base) override {} //all slices, then all the mipmaps, must be coherent virtual RID texture_create_from_native_handle(RS::TextureType p_type, Image::Format p_format, uint64_t p_native_handle, int p_width, int p_height, int p_depth, int p_layers = 1, RS::TextureLayeredType p_layered_type = RS::TEXTURE_LAYERED_2D_ARRAY) override { return RID(); } - virtual void texture_2d_update(RID p_texture, const Ref &p_image, int p_layer = 0) override{}; - virtual void texture_3d_update(RID p_texture, const Vector> &p_data) override{}; - virtual void texture_proxy_update(RID p_proxy, RID p_base) override{}; + virtual void texture_2d_update(RID p_texture, const Ref &p_image, int p_layer = 0) override {} + virtual void texture_3d_update(RID p_texture, const Vector> &p_data) override {} + virtual void texture_proxy_update(RID p_proxy, RID p_base) override {} //these two APIs can be used together or in combination with the others. - virtual void texture_2d_placeholder_initialize(RID p_texture) override{}; - virtual void texture_2d_layered_placeholder_initialize(RID p_texture, RenderingServer::TextureLayeredType p_layered_type) override{}; - virtual void texture_3d_placeholder_initialize(RID p_texture) override{}; + virtual void texture_2d_placeholder_initialize(RID p_texture) override {} + virtual void texture_2d_layered_placeholder_initialize(RID p_texture, RenderingServer::TextureLayeredType p_layered_type) override {} + virtual void texture_3d_placeholder_initialize(RID p_texture) override {} virtual Ref texture_2d_get(RID p_texture) const override { DummyTexture *t = texture_owner.get_or_null(p_texture); @@ -112,31 +112,31 @@ public: virtual Vector> texture_3d_get(RID p_texture) const override { return Vector>(); }; virtual void texture_replace(RID p_texture, RID p_by_texture) override { texture_free(p_by_texture); }; - virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) override{}; + virtual void texture_set_size_override(RID p_texture, int p_width, int p_height) override {} - virtual void texture_set_path(RID p_texture, const String &p_path) override{}; + virtual void texture_set_path(RID p_texture, const String &p_path) override {} virtual String texture_get_path(RID p_texture) const override { return String(); }; virtual Image::Format texture_get_format(RID p_texture) const override { return Image::FORMAT_MAX; } - virtual void texture_set_detect_3d_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) override{}; - virtual void texture_set_detect_normal_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) override{}; - virtual void texture_set_detect_roughness_callback(RID p_texture, RS::TextureDetectRoughnessCallback p_callback, void *p_userdata) override{}; + virtual void texture_set_detect_3d_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) override {} + virtual void texture_set_detect_normal_callback(RID p_texture, RS::TextureDetectCallback p_callback, void *p_userdata) override {} + virtual void texture_set_detect_roughness_callback(RID p_texture, RS::TextureDetectRoughnessCallback p_callback, void *p_userdata) override {} - virtual void texture_debug_usage(List *r_info) override{}; + virtual void texture_debug_usage(List *r_info) override {} - virtual void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) override{}; + virtual void texture_set_force_redraw_if_visible(RID p_texture, bool p_enable) override {} virtual Size2 texture_size_with_proxy(RID p_proxy) override { return Size2(); }; - virtual void texture_rd_initialize(RID p_texture, const RID &p_rd_texture, const RS::TextureLayeredType p_layer_type = RS::TEXTURE_LAYERED_2D_ARRAY) override{}; + virtual void texture_rd_initialize(RID p_texture, const RID &p_rd_texture, const RS::TextureLayeredType p_layer_type = RS::TEXTURE_LAYERED_2D_ARRAY) override {} virtual RID texture_get_rd_texture(RID p_texture, bool p_srgb = false) const override { return RID(); }; virtual uint64_t texture_get_native_handle(RID p_texture, bool p_srgb = false) const override { return 0; }; /* DECAL API */ virtual RID decal_allocate() override { return RID(); } virtual void decal_initialize(RID p_rid) override {} - virtual void decal_free(RID p_rid) override{}; + virtual void decal_free(RID p_rid) override {} virtual void decal_set_size(RID p_decal, const Vector3 &p_size) override {} virtual void decal_set_texture(RID p_decal, RS::DecalTexture p_type, RID p_texture) override {} diff --git a/servers/rendering/renderer_rd/environment/fog.h b/servers/rendering/renderer_rd/environment/fog.h index 25fb190f444..75b9c563f73 100644 --- a/servers/rendering/renderer_rd/environment/fog.h +++ b/servers/rendering/renderer_rd/environment/fog.h @@ -316,8 +316,8 @@ public: int last_shadow_filter = -1; - virtual void configure(RenderSceneBuffersRD *p_render_buffers) override{}; - virtual void free_data() override{}; + virtual void configure(RenderSceneBuffersRD *p_render_buffers) override {} + virtual void free_data() override {} bool sync_gi_dependent_sets_validity(bool p_ensure_freed = false); diff --git a/servers/rendering/renderer_rd/environment/gi.h b/servers/rendering/renderer_rd/environment/gi.h index 6169d386b53..f6f9ab4f754 100644 --- a/servers/rendering/renderer_rd/environment/gi.h +++ b/servers/rendering/renderer_rd/environment/gi.h @@ -461,7 +461,7 @@ public: RID get_voxel_gi_buffer(); - virtual void configure(RenderSceneBuffersRD *p_render_buffers) override{}; + virtual void configure(RenderSceneBuffersRD *p_render_buffers) override {} virtual void free_data() override; }; @@ -675,7 +675,7 @@ public: int32_t cascade_dynamic_light_count[SDFGI::MAX_CASCADES]; //used dynamically RID integrate_sky_uniform_set; - virtual void configure(RenderSceneBuffersRD *p_render_buffers) override{}; + virtual void configure(RenderSceneBuffersRD *p_render_buffers) override {} virtual void free_data() override; ~SDFGI(); diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h index fc60c770e8c..9e429d598ad 100644 --- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h +++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.h @@ -366,12 +366,12 @@ protected: virtual RID _render_buffers_get_normal_texture(Ref p_render_buffers) override; virtual RID _render_buffers_get_velocity_texture(Ref p_render_buffers) override; - virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override{}; - virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override{}; - virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) override{}; + virtual void environment_set_ssao_quality(RS::EnvironmentSSAOQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {} + virtual void environment_set_ssil_quality(RS::EnvironmentSSILQuality p_quality, bool p_half_size, float p_adaptive_target, int p_blur_passes, float p_fadeout_from, float p_fadeout_to) override {} + virtual void environment_set_ssr_roughness_quality(RS::EnvironmentSSRRoughnessQuality p_quality) override {} - virtual void sub_surface_scattering_set_quality(RS::SubSurfaceScatteringQuality p_quality) override{}; - virtual void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) override{}; + virtual void sub_surface_scattering_set_quality(RS::SubSurfaceScatteringQuality p_quality) override {} + virtual void sub_surface_scattering_set_scale(float p_scale, float p_depth_scale) override {} /* Geometry instance */ diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.h b/servers/rendering/renderer_rd/renderer_scene_render_rd.h index 022a4560f8d..b82d50378eb 100644 --- a/servers/rendering/renderer_rd/renderer_scene_render_rd.h +++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.h @@ -165,9 +165,9 @@ public: /* LIGHTING */ - virtual void setup_added_reflection_probe(const Transform3D &p_transform, const Vector3 &p_half_size){}; - virtual void setup_added_light(const RS::LightType p_type, const Transform3D &p_transform, float p_radius, float p_spot_aperture){}; - virtual void setup_added_decal(const Transform3D &p_transform, const Vector3 &p_half_size){}; + virtual void setup_added_reflection_probe(const Transform3D &p_transform, const Vector3 &p_half_size) {} + virtual void setup_added_light(const RS::LightType p_type, const Transform3D &p_transform, float p_radius, float p_spot_aperture) {} + virtual void setup_added_decal(const Transform3D &p_transform, const Vector3 &p_half_size) {} /* GI */ diff --git a/servers/rendering/renderer_rd/shader_rd.h b/servers/rendering/renderer_rd/shader_rd.h index 22a21086af9..688092d604f 100644 --- a/servers/rendering/renderer_rd/shader_rd.h +++ b/servers/rendering/renderer_rd/shader_rd.h @@ -46,7 +46,7 @@ public: int group = 0; CharString text; bool default_enabled = true; - VariantDefine(){}; + VariantDefine() {} VariantDefine(int p_group, const String &p_text, bool p_default_enabled) { group = p_group; default_enabled = p_default_enabled; diff --git a/servers/rendering/renderer_rd/shaders/canvas.glsl b/servers/rendering/renderer_rd/shaders/canvas.glsl index 2154d56faf0..5e19c24246c 100644 --- a/servers/rendering/renderer_rd/shaders/canvas.glsl +++ b/servers/rendering/renderer_rd/shaders/canvas.glsl @@ -41,11 +41,11 @@ layout(location = 3) out vec2 pixel_size_interp; #endif #ifdef MATERIAL_UNIFORMS_USED -layout(set = 1, binding = 0, std140) uniform MaterialUniforms{ - +/* clang-format off */ +layout(set = 1, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS - } material; +/* clang-format on */ #endif #GLOBALS @@ -258,11 +258,11 @@ layout(location = 3) in vec2 pixel_size_interp; layout(location = 0) out vec4 frag_color; #ifdef MATERIAL_UNIFORMS_USED -layout(set = 1, binding = 0, std140) uniform MaterialUniforms{ - +/* clang-format off */ +layout(set = 1, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS - } material; +/* clang-format on */ #endif vec2 screen_uv_to_sdf(vec2 p_uv) { diff --git a/servers/rendering/renderer_rd/shaders/environment/sky.glsl b/servers/rendering/renderer_rd/shaders/environment/sky.glsl index 5aa37354948..cc1c40cad1f 100644 --- a/servers/rendering/renderer_rd/shaders/environment/sky.glsl +++ b/servers/rendering/renderer_rd/shaders/environment/sky.glsl @@ -106,9 +106,11 @@ layout(set = 0, binding = 3, std140) uniform DirectionalLights { directional_lights; #ifdef MATERIAL_UNIFORMS_USED -layout(set = 1, binding = 0, std140) uniform MaterialUniforms{ +/* clang-format off */ +layout(set = 1, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS } material; +/* clang-format on */ #endif layout(set = 2, binding = 0) uniform textureCube radiance; @@ -247,9 +249,7 @@ void main() { #endif //USE_CUBEMAP_PASS { - #CODE : SKY - } frag_color.rgb = color; diff --git a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl index 2360375c237..929f1e34df0 100644 --- a/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl +++ b/servers/rendering/renderer_rd/shaders/environment/volumetric_fog.glsl @@ -77,9 +77,11 @@ layout(r32ui, set = 1, binding = 4) uniform volatile uimage3D light_only_map; #endif #ifdef MATERIAL_UNIFORMS_USED -layout(set = 2, binding = 0, std140) uniform MaterialUniforms{ +/* clang-format off */ +layout(set = 2, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS } material; +/* clang-format on */ #endif #GLOBALS diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl index cfde97af95f..a441b1667d2 100644 --- a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl @@ -116,9 +116,11 @@ layout(location = 8) out vec4 prev_screen_position; #endif #ifdef MATERIAL_UNIFORMS_USED -layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms{ +/* clang-format off */ +layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS } material; +/* clang-format on */ #endif float global_time; @@ -808,11 +810,11 @@ ivec2 multiview_uv(ivec2 uv) { #endif #ifdef MATERIAL_UNIFORMS_USED -layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms{ - +/* clang-format off */ +layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS - } material; +/* clang-format on */ #endif #GLOBALS diff --git a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl index b21769f2074..92a8e2be326 100644 --- a/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl +++ b/servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl @@ -107,11 +107,11 @@ layout(location = 6) mediump out vec3 binormal_interp; #endif #ifdef MATERIAL_UNIFORMS_USED -layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms{ - +/* clang-format off */ +layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS - } material; +/* clang-format on */ #endif #ifdef MODE_DUAL_PARABOLOID @@ -671,11 +671,11 @@ ivec2 multiview_uv(ivec2 uv) { #endif #ifdef MATERIAL_UNIFORMS_USED -layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms{ - +/* clang-format off */ +layout(set = MATERIAL_UNIFORM_SET, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS - } material; +/* clang-format on */ #endif #GLOBALS diff --git a/servers/rendering/renderer_rd/shaders/particles.glsl b/servers/rendering/renderer_rd/shaders/particles.glsl index 7c5291038fe..a8f27ba726e 100644 --- a/servers/rendering/renderer_rd/shaders/particles.glsl +++ b/servers/rendering/renderer_rd/shaders/particles.glsl @@ -168,11 +168,11 @@ layout(set = 2, binding = 1) uniform texture2D height_field_texture; /* SET 3: MATERIAL */ #ifdef MATERIAL_UNIFORMS_USED -layout(set = 3, binding = 0, std140) uniform MaterialUniforms{ - +/* clang-format off */ +layout(set = 3, binding = 0, std140) uniform MaterialUniforms { #MATERIAL_UNIFORMS - } material; +/* clang-format on */ #endif layout(push_constant, std430) uniform Params { diff --git a/servers/rendering/renderer_scene_occlusion_cull.h b/servers/rendering/renderer_scene_occlusion_cull.h index a848c86bd2a..df403c54841 100644 --- a/servers/rendering/renderer_scene_occlusion_cull.h +++ b/servers/rendering/renderer_scene_occlusion_cull.h @@ -192,7 +192,7 @@ public: RID get_debug_texture(); const Size2i &get_occlusion_buffer_size() const { return occlusion_buffer_size; } - virtual ~HZBuffer(){}; + virtual ~HZBuffer() {} }; static RendererSceneOcclusionCull *get_singleton() { return singleton; } diff --git a/servers/rendering/rendering_device_commons.h b/servers/rendering/rendering_device_commons.h index 8c3996bd804..d72265958cb 100644 --- a/servers/rendering/rendering_device_commons.h +++ b/servers/rendering/rendering_device_commons.h @@ -34,7 +34,7 @@ #include "core/object/object.h" #include "core/variant/type_info.h" -#define STEPIFY(m_number, m_alignment) ((((m_number) + ((m_alignment)-1)) / (m_alignment)) * (m_alignment)) +#define STEPIFY(m_number, m_alignment) ((((m_number) + ((m_alignment) - 1)) / (m_alignment)) * (m_alignment)) class RenderingDeviceCommons : public Object { //////////////////////////////////////////// diff --git a/servers/rendering/storage/material_storage.h b/servers/rendering/storage/material_storage.h index 03feda8abb0..a5935cc90f7 100644 --- a/servers/rendering/storage/material_storage.h +++ b/servers/rendering/storage/material_storage.h @@ -36,7 +36,7 @@ class RendererMaterialStorage { public: - virtual ~RendererMaterialStorage(){}; + virtual ~RendererMaterialStorage() {} /* GLOBAL SHADER UNIFORM API */ virtual void global_shader_parameter_add(const StringName &p_name, RS::GlobalShaderParameterType p_type, const Variant &p_value) = 0; diff --git a/servers/rendering/storage/render_scene_buffers.h b/servers/rendering/storage/render_scene_buffers.h index 6c82d477997..b860af76400 100644 --- a/servers/rendering/storage/render_scene_buffers.h +++ b/servers/rendering/storage/render_scene_buffers.h @@ -91,7 +91,7 @@ public: void set_use_debanding(bool p_use_debanding) { use_debanding = p_use_debanding; } RenderSceneBuffersConfiguration() {} - virtual ~RenderSceneBuffersConfiguration(){}; + virtual ~RenderSceneBuffersConfiguration() {} }; class RenderSceneBuffers : public RefCounted { @@ -101,8 +101,8 @@ protected: static void _bind_methods(); public: - RenderSceneBuffers(){}; - virtual ~RenderSceneBuffers(){}; + RenderSceneBuffers() {} + virtual ~RenderSceneBuffers() {} virtual void configure(const RenderSceneBuffersConfiguration *p_config) = 0; @@ -124,7 +124,7 @@ protected: GDVIRTUAL1(_set_use_debanding, bool) public: - virtual ~RenderSceneBuffersExtension(){}; + virtual ~RenderSceneBuffersExtension() {} virtual void configure(const RenderSceneBuffersConfiguration *p_config) override; diff --git a/servers/rendering/storage/texture_storage.h b/servers/rendering/storage/texture_storage.h index 7388307ac0f..6e1cb9eb7f4 100644 --- a/servers/rendering/storage/texture_storage.h +++ b/servers/rendering/storage/texture_storage.h @@ -61,7 +61,7 @@ public: /* Texture API */ virtual bool can_create_resources_async() const = 0; - virtual ~RendererTextureStorage(){}; + virtual ~RendererTextureStorage() {} virtual RID texture_allocate() = 0; virtual void texture_free(RID p_rid) = 0; diff --git a/servers/xr/xr_controller_tracker.cpp b/servers/xr/xr_controller_tracker.cpp index df85e86b7e9..2d6cf44ce87 100644 --- a/servers/xr/xr_controller_tracker.cpp +++ b/servers/xr/xr_controller_tracker.cpp @@ -32,7 +32,7 @@ #include "core/input/input.h" -void XRControllerTracker::_bind_methods(){}; +void XRControllerTracker::_bind_methods() {} XRControllerTracker::XRControllerTracker() { type = XRServer::TRACKER_CONTROLLER; diff --git a/servers/xr/xr_interface.h b/servers/xr/xr_interface.h index 6b6a67a04c0..55495731c55 100644 --- a/servers/xr/xr_interface.h +++ b/servers/xr/xr_interface.h @@ -137,10 +137,10 @@ public: virtual RID get_color_texture(); /* obtain color output texture (if applicable) */ virtual RID get_depth_texture(); /* obtain depth output texture (if applicable, used for reprojection) */ virtual RID get_velocity_texture(); /* obtain velocity output texture (if applicable, used for spacewarp) */ - virtual void pre_render(){}; + virtual void pre_render() {} virtual bool pre_draw_viewport(RID p_render_target) { return true; }; /* inform XR interface we are about to start our viewport draw process */ virtual Vector post_draw_viewport(RID p_render_target, const Rect2 &p_screen_rect) = 0; /* inform XR interface we finished our viewport draw process */ - virtual void end_frame(){}; + virtual void end_frame() {} /** passthrough **/