Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions scene/gui/base_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ bool BaseButton::is_hovered() const {
BaseButton::DrawMode BaseButton::get_draw_mode() const {
if (status.disabled) {
return DRAW_DISABLED;
};
}

if (!status.press_attempt && status.hovering) {
if (status.pressed) {
Expand All @@ -273,8 +273,7 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const {

return DRAW_HOVER;
} else {
/* determine if pressed or not */

// Determine if pressed or not.
bool pressing;
if (status.press_attempt) {
pressing = (status.pressing_inside || keep_pressed_outside);
Expand All @@ -291,8 +290,6 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const {
return DRAW_NORMAL;
}
}

return DRAW_NORMAL;
}

void BaseButton::set_toggle_mode(bool p_on) {
Expand Down
12 changes: 4 additions & 8 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) co
} else if (p_item->E->next()) {
return p_item->E->next()->get();
} else {
//go up until something with a next is found
// Go up until something with a next is found.
while (p_item->parent && !p_item->E->next()) {
p_item = p_item->parent;
}
Expand All @@ -72,7 +72,7 @@ RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) co
} else if (p_item->E->next()) {
return p_item->E->next()->get();
} else {
//go up until something with a next is found
// Go up until something with a next is found.
while (p_item->type != ITEM_FRAME && !p_item->E->next()) {
p_item = p_item->parent;
}
Expand All @@ -84,8 +84,6 @@ RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) co
}
}
}

return nullptr;
}

RichTextLabel::Item *RichTextLabel::_get_prev_item(Item *p_item, bool p_free) const {
Expand All @@ -97,7 +95,7 @@ RichTextLabel::Item *RichTextLabel::_get_prev_item(Item *p_item, bool p_free) co
} else if (p_item->E->prev()) {
return p_item->E->prev()->get();
} else {
//go back until something with a prev is found
// Go back until something with a prev is found.
while (p_item->parent && !p_item->E->prev()) {
p_item = p_item->parent;
}
Expand All @@ -117,7 +115,7 @@ RichTextLabel::Item *RichTextLabel::_get_prev_item(Item *p_item, bool p_free) co
} else if (p_item->E->prev()) {
return p_item->E->prev()->get();
} else {
//go back until something with a prev is found
// Go back until something with a prev is found.
while (p_item->type != ITEM_FRAME && !p_item->E->prev()) {
p_item = p_item->parent;
}
Expand All @@ -129,8 +127,6 @@ RichTextLabel::Item *RichTextLabel::_get_prev_item(Item *p_item, bool p_free) co
}
}
}

return nullptr;
}

Rect2 RichTextLabel::_get_text_rect() {
Expand Down
4 changes: 1 addition & 3 deletions scene/resources/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2102,11 +2102,9 @@ bool Animation::track_is_compressed(int p_track) const {
return bst->compressed_track >= 0;
} break;
default: {
return false; //animation does not really use transitions
return false; // Animation does not really use transitions.
} break;
}

ERR_FAIL_V(false);
}

void Animation::track_set_key_value(int p_track, int p_key_idx, const Variant &p_value) {
Expand Down
2 changes: 0 additions & 2 deletions scene/resources/material.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3123,8 +3123,6 @@ bool StandardMaterial3D::_set(const StringName &p_name, const Variant &p_value)
WARN_PRINT("Godot 3.x SpatialMaterial remapped parameter not found: " + String(p_name));
return true;
}

return false;
}

#endif // DISABLE_DEPRECATED
Expand Down
1 change: 0 additions & 1 deletion scene/resources/tile_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,6 @@ Vector<Point2> TileSet::get_terrain_polygon(int p_terrain_set) {
}
return _get_half_offset_terrain_polygon(tile_size, overlap, tile_offset_axis);
}
return Vector<Point2>();
}

Vector<Point2> TileSet::get_terrain_peering_bit_polygon(int p_terrain_set, TileSet::CellNeighbor p_bit) {
Expand Down
47 changes: 27 additions & 20 deletions scene/resources/visual_shader_particle_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,31 +1130,38 @@ VisualShaderNodeParticleAccelerator::VisualShaderNodeParticleAccelerator() {
// VisualShaderNodeParticleOutput

String VisualShaderNodeParticleOutput::get_caption() const {
if (shader_type == VisualShader::TYPE_START) {
return "StartOutput";
} else if (shader_type == VisualShader::TYPE_PROCESS) {
return "ProcessOutput";
} else if (shader_type == VisualShader::TYPE_COLLIDE) {
return "CollideOutput";
} else if (shader_type == VisualShader::TYPE_START_CUSTOM) {
return "CustomStartOutput";
} else if (shader_type == VisualShader::TYPE_PROCESS_CUSTOM) {
return "CustomProcessOutput";
switch (shader_type) {
case VisualShader::TYPE_START:
return "StartOutput";
case VisualShader::TYPE_PROCESS:
return "ProcessOutput";
case VisualShader::TYPE_COLLIDE:
return "CollideOutput";
case VisualShader::TYPE_START_CUSTOM:
return "CustomStartOutput";
case VisualShader::TYPE_PROCESS_CUSTOM:
return "CustomProcessOutput";
default:
ERR_PRINT(vformat("Unexpected shader_type %d for VisualShaderNodeParticleOutput.", shader_type));
return "";
}
return String();
}

int VisualShaderNodeParticleOutput::get_input_port_count() const {
if (shader_type == VisualShader::TYPE_START) {
return 8;
} else if (shader_type == VisualShader::TYPE_COLLIDE) {
return 5;
} else if (shader_type == VisualShader::TYPE_START_CUSTOM || shader_type == VisualShader::TYPE_PROCESS_CUSTOM) {
return 6;
} else { // TYPE_PROCESS
return 7;
switch (shader_type) {
case VisualShader::TYPE_START:
return 8;
case VisualShader::TYPE_PROCESS:
return 7;
case VisualShader::TYPE_COLLIDE:
return 5;
case VisualShader::TYPE_START_CUSTOM:
case VisualShader::TYPE_PROCESS_CUSTOM:
return 6;
default:
ERR_PRINT(vformat("Unexpected shader_type %d for VisualShaderNodeParticleOutput.", shader_type));
return 0;
}
return 0;
}

VisualShaderNodeParticleOutput::PortType VisualShaderNodeParticleOutput::get_input_port_type(int p_port) const {
Expand Down
2 changes: 0 additions & 2 deletions servers/physics_2d/godot_space_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1036,8 +1036,6 @@ void *GodotSpace2D::_broadphase_pair(GodotCollisionObject2D *A, int p_subindex_A
GodotBodyPair2D *b = memnew(GodotBodyPair2D(static_cast<GodotBody2D *>(A), p_subindex_A, static_cast<GodotBody2D *>(B), p_subindex_B));
return b;
}

return nullptr;
}

void GodotSpace2D::_broadphase_unpair(GodotCollisionObject2D *A, int p_subindex_A, GodotCollisionObject2D *B, int p_subindex_B, void *p_data, void *p_self) {
Expand Down
2 changes: 0 additions & 2 deletions servers/rendering/renderer_rd/environment/fog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ AABB Fog::fog_volume_get_aabb(RID p_fog_volume) const {
return AABB(Vector3(-1, -1, -1), Vector3(2, 2, 2));
}
}

return AABB();
}

Vector3 Fog::fog_volume_get_extents(RID p_fog_volume) const {
Expand Down
2 changes: 0 additions & 2 deletions servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,6 @@ Ref<Image> RendererSceneRenderRD::environment_bake_panorama(RID p_env, bool p_ba
panorama->fill(panorama_color);
return panorama;
}

return Ref<Image>();
}

////////////////////////////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1874,8 +1874,6 @@ AABB ParticlesStorage::particles_collision_get_aabb(RID p_particles_collision) c
return aabb;
}
}

return AABB();
}

Vector3 ParticlesStorage::particles_collision_get_extents(RID p_particles_collision) const {
Expand Down
2 changes: 0 additions & 2 deletions servers/rendering/shader_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4396,8 +4396,6 @@ bool ShaderLanguage::_is_operator_assign(Operator p_op) const {
default:
return false;
}

return false;
}

bool ShaderLanguage::_validate_varying_assign(ShaderNode::Varying &p_varying, String *r_message) {
Expand Down