Merge pull request #59895 from akien-mga/clang-tidy
This commit is contained in:
commit
78193788d0
156 changed files with 749 additions and 951 deletions
|
|
@ -49,7 +49,7 @@ public:
|
|||
private:
|
||||
SpaceOverride gravity_space_override = SPACE_OVERRIDE_DISABLED;
|
||||
Vector2 gravity_vec;
|
||||
real_t gravity;
|
||||
real_t gravity = 0.0;
|
||||
bool gravity_is_point = false;
|
||||
real_t gravity_distance_scale = 0.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ private:
|
|||
real_t randomness_ratio = 0.0;
|
||||
double lifetime_randomness = 0.0;
|
||||
double speed_scale = 1.0;
|
||||
bool local_coords;
|
||||
bool local_coords = false;
|
||||
int fixed_fps = 0;
|
||||
bool fractional_delta = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -666,9 +666,6 @@ GPUParticles2D::GPUParticles2D() {
|
|||
set_speed_scale(1);
|
||||
set_fixed_fps(30);
|
||||
set_collision_base_size(collision_base_size);
|
||||
#ifdef TOOLS_ENABLED
|
||||
show_visibility_rect = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
GPUParticles2D::~GPUParticles2D() {
|
||||
|
|
|
|||
|
|
@ -47,20 +47,20 @@ public:
|
|||
private:
|
||||
RID particles;
|
||||
|
||||
bool one_shot;
|
||||
int amount;
|
||||
double lifetime;
|
||||
double pre_process_time;
|
||||
real_t explosiveness_ratio;
|
||||
real_t randomness_ratio;
|
||||
double speed_scale;
|
||||
bool one_shot = false;
|
||||
int amount = 0;
|
||||
double lifetime = 0.0;
|
||||
double pre_process_time = 0.0;
|
||||
real_t explosiveness_ratio = 0.0;
|
||||
real_t randomness_ratio = 0.0;
|
||||
double speed_scale = 0.0;
|
||||
Rect2 visibility_rect;
|
||||
bool local_coords;
|
||||
int fixed_fps;
|
||||
bool fractional_delta;
|
||||
bool local_coords = false;
|
||||
int fixed_fps = 0;
|
||||
bool fractional_delta = false;
|
||||
bool interpolate = true;
|
||||
#ifdef TOOLS_ENABLED
|
||||
bool show_visibility_rect;
|
||||
bool show_visibility_rect = false;
|
||||
#endif
|
||||
Ref<Material> process_material;
|
||||
|
||||
|
|
|
|||
|
|
@ -285,7 +285,6 @@ void LightOccluder2D::_bind_methods() {
|
|||
|
||||
LightOccluder2D::LightOccluder2D() {
|
||||
occluder = RS::get_singleton()->canvas_light_occluder_create();
|
||||
mask = 1;
|
||||
|
||||
set_notify_transform(true);
|
||||
set_as_sdf_collision(true);
|
||||
|
|
|
|||
|
|
@ -81,10 +81,9 @@ class LightOccluder2D : public Node2D {
|
|||
GDCLASS(LightOccluder2D, Node2D);
|
||||
|
||||
RID occluder;
|
||||
bool enabled;
|
||||
int mask;
|
||||
int mask = 1;
|
||||
Ref<OccluderPolygon2D> occluder_polygon;
|
||||
bool sdf_collision;
|
||||
bool sdf_collision = false;
|
||||
void _poly_changed();
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -45,17 +45,17 @@ class NavigationAgent2D : public Node {
|
|||
uint32_t navigable_layers = 1;
|
||||
|
||||
real_t target_desired_distance = 1.0;
|
||||
real_t radius;
|
||||
real_t neighbor_dist;
|
||||
int max_neighbors;
|
||||
real_t time_horizon;
|
||||
real_t max_speed;
|
||||
real_t radius = 0.0;
|
||||
real_t neighbor_dist = 0.0;
|
||||
int max_neighbors = 0;
|
||||
real_t time_horizon = 0.0;
|
||||
real_t max_speed = 0.0;
|
||||
|
||||
real_t path_max_distance = 3.0;
|
||||
|
||||
Vector2 target_location;
|
||||
Vector<Vector2> navigation_path;
|
||||
int nav_path_index;
|
||||
int nav_path_index = 0;
|
||||
bool velocity_submitted = false;
|
||||
Vector2 prev_safe_velocity;
|
||||
/// The submitted target velocity
|
||||
|
|
@ -63,7 +63,7 @@ class NavigationAgent2D : public Node {
|
|||
bool target_reached = false;
|
||||
bool navigation_finished = true;
|
||||
// No initialized on purpose
|
||||
uint32_t update_frame_id;
|
||||
uint32_t update_frame_id = 0;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
private:
|
||||
SpaceOverride gravity_space_override = SPACE_OVERRIDE_DISABLED;
|
||||
Vector3 gravity_vec;
|
||||
real_t gravity;
|
||||
real_t gravity = 0.0;
|
||||
bool gravity_is_point = false;
|
||||
real_t gravity_distance_scale = 0.0;
|
||||
|
||||
|
|
@ -228,4 +228,4 @@ public:
|
|||
|
||||
VARIANT_ENUM_CAST(Area3D::SpaceOverride);
|
||||
|
||||
#endif // AREA__H
|
||||
#endif // AREA_3D_H
|
||||
|
|
|
|||
|
|
@ -174,9 +174,9 @@ private:
|
|||
Vector<Color> emission_colors;
|
||||
int emission_point_count = 0;
|
||||
Vector3 emission_ring_axis;
|
||||
real_t emission_ring_height;
|
||||
real_t emission_ring_radius;
|
||||
real_t emission_ring_inner_radius;
|
||||
real_t emission_ring_height = 0.0;
|
||||
real_t emission_ring_radius = 0.0;
|
||||
real_t emission_ring_inner_radius = 0.0;
|
||||
|
||||
Ref<Curve> scale_curve_x;
|
||||
Ref<Curve> scale_curve_y;
|
||||
|
|
|
|||
|
|
@ -61,16 +61,16 @@ private:
|
|||
RID particles;
|
||||
|
||||
bool one_shot;
|
||||
int amount;
|
||||
double lifetime;
|
||||
double pre_process_time;
|
||||
real_t explosiveness_ratio;
|
||||
real_t randomness_ratio;
|
||||
double speed_scale;
|
||||
int amount = 0;
|
||||
double lifetime = 0.0;
|
||||
double pre_process_time = 0.0;
|
||||
real_t explosiveness_ratio = 0.0;
|
||||
real_t randomness_ratio = 0.0;
|
||||
double speed_scale = 0.0;
|
||||
AABB visibility_aabb;
|
||||
bool local_coords;
|
||||
int fixed_fps;
|
||||
bool fractional_delta;
|
||||
bool local_coords = false;
|
||||
int fixed_fps = 0;
|
||||
bool fractional_delta = false;
|
||||
bool interpolate = true;
|
||||
NodePath sub_emitter;
|
||||
real_t collision_base_size = 0.01;
|
||||
|
|
|
|||
|
|
@ -45,19 +45,19 @@ class NavigationAgent3D : public Node {
|
|||
uint32_t navigable_layers = 1;
|
||||
|
||||
real_t target_desired_distance = 1.0;
|
||||
real_t radius;
|
||||
real_t radius = 0.0;
|
||||
real_t navigation_height_offset = 0.0;
|
||||
bool ignore_y;
|
||||
real_t neighbor_dist;
|
||||
int max_neighbors;
|
||||
real_t time_horizon;
|
||||
real_t max_speed;
|
||||
bool ignore_y = false;
|
||||
real_t neighbor_dist = 0.0;
|
||||
int max_neighbors = 0;
|
||||
real_t time_horizon = 0.0;
|
||||
real_t max_speed = 0.0;
|
||||
|
||||
real_t path_max_distance = 3.0;
|
||||
|
||||
Vector3 target_location;
|
||||
Vector<Vector3> navigation_path;
|
||||
int nav_path_index;
|
||||
int nav_path_index = 0;
|
||||
bool velocity_submitted = false;
|
||||
Vector3 prev_safe_velocity;
|
||||
/// The submitted target velocity
|
||||
|
|
@ -65,7 +65,7 @@ class NavigationAgent3D : public Node {
|
|||
bool target_reached = false;
|
||||
bool navigation_finished = true;
|
||||
// No initialized on purpose
|
||||
uint32_t update_frame_id;
|
||||
uint32_t update_frame_id = 0;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ private:
|
|||
|
||||
bool animate_physical_bones = true;
|
||||
Vector<Bone> bones;
|
||||
bool process_order_dirty;
|
||||
bool process_order_dirty = false;
|
||||
|
||||
Vector<int> parentless_bones;
|
||||
|
||||
|
|
|
|||
|
|
@ -101,10 +101,10 @@ protected:
|
|||
uint32_t mesh_surface_offsets[RS::ARRAY_MAX];
|
||||
PackedByteArray vertex_buffer;
|
||||
PackedByteArray attribute_buffer;
|
||||
uint32_t vertex_stride;
|
||||
uint32_t attrib_stride;
|
||||
uint32_t skin_stride;
|
||||
uint32_t mesh_surface_format;
|
||||
uint32_t vertex_stride = 0;
|
||||
uint32_t attrib_stride = 0;
|
||||
uint32_t skin_stride = 0;
|
||||
uint32_t mesh_surface_format = 0;
|
||||
|
||||
void _queue_update();
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public:
|
|||
Vector3 m_0MinvJt;
|
||||
Vector3 m_1MinvJt;
|
||||
//Optimization: can be stored in the w/last component of one of the vectors
|
||||
real_t m_Adiag;
|
||||
real_t m_Adiag = 0.0;
|
||||
|
||||
real_t getDiagonal() const { return m_Adiag; }
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ private:
|
|||
VScrollBar *v_scroll = nullptr;
|
||||
|
||||
float port_grab_distance_horizontal = 0.0;
|
||||
float port_grab_distance_vertical;
|
||||
float port_grab_distance_vertical = 0.0;
|
||||
|
||||
Ref<ViewPanner> panner;
|
||||
bool warped_panning = true;
|
||||
|
|
@ -142,7 +142,7 @@ private:
|
|||
bool connecting_target = false;
|
||||
Vector2 connecting_to;
|
||||
String connecting_target_to;
|
||||
int connecting_target_index;
|
||||
int connecting_target_index = 0;
|
||||
bool just_disconnected = false;
|
||||
bool connecting_valid = false;
|
||||
Vector2 click_pos;
|
||||
|
|
@ -155,8 +155,9 @@ private:
|
|||
|
||||
float zoom = 1.0;
|
||||
float zoom_step = 1.2;
|
||||
float zoom_min;
|
||||
float zoom_max;
|
||||
// Proper values set in constructor.
|
||||
float zoom_min = 0.0;
|
||||
float zoom_max = 0.0;
|
||||
|
||||
void _zoom_minus();
|
||||
void _zoom_reset();
|
||||
|
|
@ -206,7 +207,7 @@ private:
|
|||
|
||||
Array _get_connection_list() const;
|
||||
|
||||
bool lines_on_bg;
|
||||
bool lines_on_bg = false;
|
||||
|
||||
struct ConnType {
|
||||
union {
|
||||
|
|
|
|||
|
|
@ -230,7 +230,6 @@ private:
|
|||
Rect2 last_vp_rect;
|
||||
|
||||
bool transparent_bg = false;
|
||||
bool filter;
|
||||
bool gen_mipmaps = false;
|
||||
|
||||
bool snap_controls_to_pixels = true;
|
||||
|
|
|
|||
|
|
@ -107,10 +107,10 @@ private:
|
|||
LightMode light_mode = LIGHT_MODE_NORMAL;
|
||||
bool particles_animation = false;
|
||||
|
||||
// Initialized in the constructor.
|
||||
int particles_anim_h_frames;
|
||||
int particles_anim_v_frames;
|
||||
bool particles_anim_loop;
|
||||
// Proper values set in constructor.
|
||||
int particles_anim_h_frames = 0;
|
||||
int particles_anim_v_frames = 0;
|
||||
bool particles_anim_loop = false;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
|
|||
|
|
@ -449,36 +449,36 @@ private:
|
|||
bool orm;
|
||||
|
||||
Color albedo;
|
||||
float specular;
|
||||
float metallic;
|
||||
float roughness;
|
||||
float specular = 0.0f;
|
||||
float metallic = 0.0f;
|
||||
float roughness = 0.0f;
|
||||
Color emission;
|
||||
float emission_energy;
|
||||
float normal_scale;
|
||||
float rim;
|
||||
float rim_tint;
|
||||
float clearcoat;
|
||||
float clearcoat_roughness;
|
||||
float anisotropy;
|
||||
float heightmap_scale;
|
||||
float subsurface_scattering_strength;
|
||||
float transmittance_amount;
|
||||
float emission_energy = 0.0f;
|
||||
float normal_scale = 0.0f;
|
||||
float rim = 0.0f;
|
||||
float rim_tint = 0.0f;
|
||||
float clearcoat = 0.0f;
|
||||
float clearcoat_roughness = 0.0f;
|
||||
float anisotropy = 0.0f;
|
||||
float heightmap_scale = 0.0f;
|
||||
float subsurface_scattering_strength = 0.0f;
|
||||
float transmittance_amount = 0.0f;
|
||||
Color transmittance_color;
|
||||
float transmittance_depth;
|
||||
float transmittance_boost;
|
||||
float transmittance_depth = 0.0f;
|
||||
float transmittance_boost = 0.0f;
|
||||
|
||||
Color backlight;
|
||||
float refraction;
|
||||
float point_size;
|
||||
float alpha_scissor_threshold;
|
||||
float alpha_hash_scale;
|
||||
float alpha_antialiasing_edge;
|
||||
float refraction = 0.0f;
|
||||
float point_size = 0.0f;
|
||||
float alpha_scissor_threshold = 0.0f;
|
||||
float alpha_hash_scale = 0.0f;
|
||||
float alpha_antialiasing_edge = 0.0f;
|
||||
bool grow_enabled = false;
|
||||
float ao_light_affect;
|
||||
float grow;
|
||||
int particles_anim_h_frames;
|
||||
int particles_anim_v_frames;
|
||||
bool particles_anim_loop;
|
||||
float ao_light_affect = 0.0f;
|
||||
float grow = 0.0f;
|
||||
int particles_anim_h_frames = 0;
|
||||
int particles_anim_v_frames = 0;
|
||||
bool particles_anim_loop = false;
|
||||
Transparency transparency = TRANSPARENCY_DISABLED;
|
||||
ShadingMode shading_mode = SHADING_MODE_PER_PIXEL;
|
||||
|
||||
|
|
@ -486,29 +486,29 @@ private:
|
|||
|
||||
Vector3 uv1_scale;
|
||||
Vector3 uv1_offset;
|
||||
float uv1_triplanar_sharpness;
|
||||
float uv1_triplanar_sharpness = 0.0f;
|
||||
|
||||
Vector3 uv2_scale;
|
||||
Vector3 uv2_offset;
|
||||
float uv2_triplanar_sharpness;
|
||||
float uv2_triplanar_sharpness = 0.0f;
|
||||
|
||||
DetailUV detail_uv = DETAIL_UV_1;
|
||||
|
||||
bool deep_parallax = false;
|
||||
int deep_parallax_min_layers;
|
||||
int deep_parallax_max_layers;
|
||||
int deep_parallax_min_layers = 0;
|
||||
int deep_parallax_max_layers = 0;
|
||||
bool heightmap_parallax_flip_tangent = false;
|
||||
bool heightmap_parallax_flip_binormal = false;
|
||||
|
||||
bool proximity_fade_enabled = false;
|
||||
float proximity_fade_distance;
|
||||
float proximity_fade_distance = 0.0f;
|
||||
|
||||
float msdf_pixel_range = 4.f;
|
||||
float msdf_outline_size = 0.f;
|
||||
|
||||
DistanceFadeMode distance_fade = DISTANCE_FADE_DISABLED;
|
||||
float distance_fade_max_distance;
|
||||
float distance_fade_min_distance;
|
||||
float distance_fade_max_distance = 0.0f;
|
||||
float distance_fade_min_distance = 0.0f;
|
||||
|
||||
BlendMode blend_mode = BLEND_MODE_MIX;
|
||||
BlendMode detail_blend_mode = BLEND_MODE_MIX;
|
||||
|
|
|
|||
|
|
@ -230,8 +230,8 @@ private:
|
|||
|
||||
bool is_initialized = false;
|
||||
Vector3 direction;
|
||||
float spread;
|
||||
float flatness;
|
||||
float spread = 0.0f;
|
||||
float flatness = 0.0f;
|
||||
|
||||
float params_min[PARAM_MAX];
|
||||
float params_max[PARAM_MAX];
|
||||
|
|
@ -244,34 +244,34 @@ private:
|
|||
bool particle_flags[PARTICLE_FLAG_MAX];
|
||||
|
||||
EmissionShape emission_shape;
|
||||
float emission_sphere_radius;
|
||||
float emission_sphere_radius = 0.0f;
|
||||
Vector3 emission_box_extents;
|
||||
Ref<Texture2D> emission_point_texture;
|
||||
Ref<Texture2D> emission_normal_texture;
|
||||
Ref<Texture2D> emission_color_texture;
|
||||
Vector3 emission_ring_axis;
|
||||
real_t emission_ring_height;
|
||||
real_t emission_ring_radius;
|
||||
real_t emission_ring_inner_radius;
|
||||
real_t emission_ring_height = 0.0f;
|
||||
real_t emission_ring_radius = 0.0f;
|
||||
real_t emission_ring_inner_radius = 0.0f;
|
||||
int emission_point_count = 1;
|
||||
|
||||
bool anim_loop;
|
||||
bool anim_loop = false;
|
||||
|
||||
Vector3 gravity;
|
||||
|
||||
double lifetime_randomness;
|
||||
double lifetime_randomness = 0.0;
|
||||
|
||||
SubEmitterMode sub_emitter_mode;
|
||||
double sub_emitter_frequency;
|
||||
int sub_emitter_amount_at_end;
|
||||
bool sub_emitter_keep_velocity;
|
||||
double sub_emitter_frequency = 0.0;
|
||||
int sub_emitter_amount_at_end = 0;
|
||||
bool sub_emitter_keep_velocity = false;
|
||||
//do not save emission points here
|
||||
|
||||
bool attractor_interaction_enabled;
|
||||
bool collision_enabled;
|
||||
bool collision_scale;
|
||||
float collision_friction;
|
||||
float collision_bounce;
|
||||
bool attractor_interaction_enabled = false;
|
||||
bool collision_enabled = false;
|
||||
bool collision_scale = false;
|
||||
float collision_friction = 0.0f;
|
||||
float collision_bounce = 0.0f;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ private:
|
|||
|
||||
bool _simulation_state_dirty = false;
|
||||
TypedArray<StringName> _simulation_state_dirty_names;
|
||||
bool _simulation_state_dirty_process;
|
||||
bool _simulation_state_dirty_process = false;
|
||||
void _update_simulation_state();
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -40,19 +40,19 @@ class ProceduralSkyMaterial : public Material {
|
|||
private:
|
||||
Color sky_top_color;
|
||||
Color sky_horizon_color;
|
||||
float sky_curve;
|
||||
float sky_energy;
|
||||
float sky_curve = 0.0f;
|
||||
float sky_energy = 0.0f;
|
||||
Ref<Texture2D> sky_cover;
|
||||
Color sky_cover_modulate;
|
||||
|
||||
Color ground_bottom_color;
|
||||
Color ground_horizon_color;
|
||||
float ground_curve;
|
||||
float ground_energy;
|
||||
float ground_curve = 0.0f;
|
||||
float ground_energy = 0.0f;
|
||||
|
||||
float sun_angle_max;
|
||||
float sun_curve;
|
||||
float dither_strength;
|
||||
float sun_angle_max = 0.0f;
|
||||
float sun_curve = 0.0f;
|
||||
float dither_strength = 0.0f;
|
||||
|
||||
static Mutex shader_mutex;
|
||||
static RID shader;
|
||||
|
|
@ -158,16 +158,16 @@ private:
|
|||
static Mutex shader_mutex;
|
||||
static RID shader;
|
||||
|
||||
float rayleigh;
|
||||
float rayleigh = 0.0f;
|
||||
Color rayleigh_color;
|
||||
float mie;
|
||||
float mie_eccentricity;
|
||||
float mie = 0.0f;
|
||||
float mie_eccentricity = 0.0f;
|
||||
Color mie_color;
|
||||
float turbidity;
|
||||
float sun_disk_scale;
|
||||
float turbidity = 0.0f;
|
||||
float sun_disk_scale = 0.0f;
|
||||
Color ground_color;
|
||||
float exposure;
|
||||
float dither_strength;
|
||||
float exposure = 0.0f;
|
||||
float dither_strength = 0.0f;
|
||||
Ref<Texture2D> night_sky;
|
||||
static void _update_shader();
|
||||
mutable bool shader_set = false;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
class SphereShape3D : public Shape3D {
|
||||
GDCLASS(SphereShape3D, Shape3D);
|
||||
float radius;
|
||||
float radius = 1.0f;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue