Style: Apply new changes from clang-format 8.0

It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
This commit is contained in:
Rémi Verschelde 2019-04-09 17:08:36 +02:00
parent 4b2c79c471
commit c8994b56f9
85 changed files with 382 additions and 251 deletions

View file

@ -2445,7 +2445,8 @@ void _Thread::_start_func(void *ud) {
reason = "Method Not Found";
} break;
default: {}
default: {
}
}
ERR_EXPLAIN("Could not call function '" + t->target_method.operator String() + "'' starting thread ID: " + t->get_id() + " Reason: " + reason);

View file

@ -1266,7 +1266,8 @@ void Image::shrink_x2() {
case FORMAT_RGBAH: _generate_po2_mipmap<uint16_t, 4, false, Image::average_4_half, Image::renormalize_half>(reinterpret_cast<const uint16_t *>(r.ptr()), reinterpret_cast<uint16_t *>(w.ptr()), width, height); break;
case FORMAT_RGBE9995: _generate_po2_mipmap<uint32_t, 1, false, Image::average_4_rgbe9995, Image::renormalize_rgbe9995>(reinterpret_cast<const uint32_t *>(r.ptr()), reinterpret_cast<uint32_t *>(w.ptr()), width, height); break;
default: {}
default: {
}
}
}
@ -1398,7 +1399,8 @@ Error Image::generate_mipmaps(bool p_renormalize) {
_generate_po2_mipmap<uint32_t, 1, false, Image::average_4_rgbe9995, Image::renormalize_rgbe9995>(reinterpret_cast<const uint32_t *>(&wp[prev_ofs]), reinterpret_cast<uint32_t *>(&wp[ofs]), prev_w, prev_h);
break;
default: {}
default: {
}
}
prev_ofs = ofs;
@ -1612,7 +1614,8 @@ void Image::create(const char **p_xpm) {
if (y == (size_height - 1))
status = DONE;
} break;
default: {}
default: {
}
}
line++;
@ -1685,7 +1688,8 @@ bool Image::is_invisible() const {
case FORMAT_DXT5: {
detected = true;
} break;
default: {}
default: {
}
}
return !detected;
@ -1729,7 +1733,8 @@ Image::AlphaMode Image::detect_alpha() const {
case FORMAT_DXT5: {
detected = true;
} break;
default: {}
default: {
}
}
if (detected)

View file

@ -768,7 +768,9 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
r_variant = carray;
} break;
default: { ERR_FAIL_V(ERR_BUG); }
default: {
ERR_FAIL_V(ERR_BUG);
}
}
return OK;
@ -823,7 +825,8 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
flags |= ENCODE_FLAG_OBJECT_AS_ID;
}
} break;
default: {} // nothing to do at this stage
default: {
} // nothing to do at this stage
}
if (buf) {
@ -1385,7 +1388,9 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
r_len += 4 * 4 * len;
} break;
default: { ERR_FAIL_V(ERR_BUG); }
default: {
ERR_FAIL_V(ERR_BUG);
}
}
return OK;

View file

@ -1725,7 +1725,8 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant
get_string_index(np.get_subname(i));
} break;
default: {}
default: {
}
}
}

View file

@ -557,7 +557,7 @@ void Basis::set_euler_yxz(const Vector3 &p_euler) {
*this = ymat * xmat * zmat;
}
bool Basis::is_equal_approx(const Basis &a, const Basis &b,real_t p_epsilon) const {
bool Basis::is_equal_approx(const Basis &a, const Basis &b, real_t p_epsilon) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
@ -569,7 +569,7 @@ bool Basis::is_equal_approx(const Basis &a, const Basis &b,real_t p_epsilon) con
return true;
}
bool Basis::is_equal_approx_ratio(const Basis &a, const Basis &b,real_t p_epsilon) const {
bool Basis::is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon) const {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {

View file

@ -133,8 +133,8 @@ public:
return elements[0][2] * v[0] + elements[1][2] * v[1] + elements[2][2] * v[2];
}
bool is_equal_approx(const Basis &a, const Basis &b, real_t p_epsilon=CMP_EPSILON) const;
bool is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon=UNIT_EPSILON) const;
bool is_equal_approx(const Basis &a, const Basis &b, real_t p_epsilon = CMP_EPSILON) const;
bool is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon = UNIT_EPSILON) const;
bool operator==(const Basis &p_matrix) const;
bool operator!=(const Basis &p_matrix) const;

View file

@ -760,7 +760,8 @@ void Expression::exec_func(BuiltinFunc p_func, const Variant **p_inputs, Variant
*r_return = String(color);
} break;
default: {}
default: {
}
}
}
@ -1679,7 +1680,8 @@ Expression::ENode *Expression::_parse_expression() {
case TK_OP_BIT_OR: op = Variant::OP_BIT_OR; break;
case TK_OP_BIT_XOR: op = Variant::OP_BIT_XOR; break;
case TK_OP_BIT_INVERT: op = Variant::OP_BIT_NEGATE; break;
default: {};
default: {
};
}
if (op == Variant::OP_MAX) { //stop appending stuff

View file

@ -1637,7 +1637,8 @@ void Object::_clear_internal_resource_paths(const Variant &p_var) {
_clear_internal_resource_paths(d[E->get()]);
}
} break;
default: {}
default: {
}
}
}

View file

@ -319,7 +319,8 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd
} break;
default: {}
default: {
}
}
return OK;

View file

@ -179,7 +179,8 @@ String Variant::get_type_name(Variant::Type p_type) {
return "PoolColorArray";
} break;
default: {}
default: {
}
}
return "";
@ -403,7 +404,8 @@ bool Variant::can_convert(Variant::Type p_type_from, Variant::Type p_type_to) {
valid_types = valid;
} break;
default: {}
default: {
}
}
if (valid_types) {
@ -649,7 +651,8 @@ bool Variant::can_convert_strict(Variant::Type p_type_from, Variant::Type p_type
valid_types = valid;
} break;
default: {}
default: {
}
}
if (valid_types) {
@ -841,7 +844,8 @@ bool Variant::is_zero() const {
return reinterpret_cast<const PoolVector<Color> *>(_data._mem)->size() == 0;
} break;
default: {}
default: {
}
}
return false;
@ -896,7 +900,9 @@ bool Variant::is_one() const {
} break;
default: { return !is_zero(); }
default: {
return !is_zero();
}
}
return false;
@ -1039,7 +1045,8 @@ void Variant::reference(const Variant &p_variant) {
memnew_placement(_data._mem, PoolVector<Color>(*reinterpret_cast<const PoolVector<Color> *>(p_variant._data._mem)));
} break;
default: {}
default: {
}
}
}
@ -1143,7 +1150,8 @@ void Variant::clear() {
reinterpret_cast<PoolVector<Color> *>(_data._mem)->~PoolVector<Color>();
} break;
default: {} /* not needed */
default: {
} /* not needed */
}
type = NIL;
@ -1823,7 +1831,9 @@ inline DA _convert_array_from_variant(const Variant &p_variant) {
case Variant::POOL_COLOR_ARRAY: {
return _convert_array<DA, PoolVector<Color> >(p_variant.operator PoolVector<Color>());
}
default: { return DA(); }
default: {
return DA();
}
}
return DA();
@ -2642,7 +2652,8 @@ void Variant::operator=(const Variant &p_variant) {
*reinterpret_cast<PoolVector<Color> *>(_data._mem) = *reinterpret_cast<const PoolVector<Color> *>(p_variant._data._mem);
} break;
default: {}
default: {
}
}
}
@ -2919,7 +2930,8 @@ uint32_t Variant::hash() const {
return hash;
} break;
default: {}
default: {
}
}
return 0;
@ -3167,7 +3179,8 @@ bool Variant::is_shared() const {
case OBJECT: return true;
case ARRAY: return true;
case DICTIONARY: return true;
default: {}
default: {
}
}
return false;
@ -3204,7 +3217,8 @@ Variant Variant::call(const StringName &p_method, VARIANT_ARG_DECLARE) {
String err = "Too many arguments for method '" + p_method + "'";
ERR_PRINT(err.utf8().get_data());
} break;
default: {}
default: {
}
}
return ret;

View file

@ -2781,7 +2781,8 @@ bool Variant::in(const Variant &p_index, bool *r_valid) const {
return false;
}
} break;
default: {}
default: {
}
}
if (r_valid)
@ -2912,7 +2913,8 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const {
//nothing
} break;
default: {}
default: {
}
}
}
@ -3251,7 +3253,8 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const {
r_iter = idx;
return true;
} break;
default: {}
default: {
}
}
valid = false;
@ -3408,7 +3411,8 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
#endif
return arr->get(idx);
} break;
default: {}
default: {
}
}
r_valid = false;

View file

@ -1948,7 +1948,8 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, " )");
} break;
default: {}
default: {
}
}
return OK;

View file

@ -943,7 +943,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
} break;
default: {}
default: {
}
}
}
}
@ -1032,7 +1033,8 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur
glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
} break;
default: {}
default: {
}
}
}
}

View file

@ -1208,7 +1208,8 @@ void RasterizerSceneGLES2::_fill_render_list(InstanceBase **p_cull_result, int p
} break;
default: {}
default: {
}
}
}
}
@ -1369,7 +1370,8 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste
glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
} break;
default: {}
default: {
}
}
}
}
@ -1530,7 +1532,8 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste
glVertexAttrib4f(VS::ARRAY_COLOR, 1, 1, 1, 1);
} break;
default: {}
default: {
}
}
}
}
@ -1550,7 +1553,8 @@ void RasterizerSceneGLES2::_setup_geometry(RenderList::Element *p_element, Raste
case VS::INSTANCE_IMMEDIATE: {
} break;
default: {}
default: {
}
}
}
@ -1758,7 +1762,8 @@ void RasterizerSceneGLES2::_render_geometry(RenderList::Element *p_element) {
}
} break;
default: {}
default: {
}
}
}
@ -2074,7 +2079,8 @@ void RasterizerSceneGLES2::_setup_light(LightInstance *light, ShadowAtlas *shado
}
} break;
default: {}
default: {
}
}
}

View file

@ -1278,7 +1278,8 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
} break;
default: {}
default: {
}
}
}
@ -1525,7 +1526,8 @@ void RasterizerSceneGLES3::_setup_geometry(RenderList::Element *e, const Transfo
}
} break;
default: {}
default: {
}
}
}
@ -1847,7 +1849,8 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) {
}
} break;
default: {}
default: {
}
}
}
@ -3248,7 +3251,8 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
}
} break;
default: {}
default: {
}
}
}
}
@ -4423,7 +4427,8 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
break;
default: {}
default: {
}
}
}

View file

@ -642,7 +642,8 @@ void RasterizerStorageGLES3::texture_allocate(RID p_texture, int p_width, int p_
p_flags &= ~VS::TEXTURE_FLAG_FILTER;
}
} break;
default: {}
default: {
}
}
#endif
@ -2751,7 +2752,8 @@ _FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataTy
gui[14] = v.origin.z;
gui[15] = 1;
} break;
default: {}
default: {
}
}
}
@ -2919,7 +2921,8 @@ _FORCE_INLINE_ static void _fill_std140_ubo_value(ShaderLanguage::DataType type,
gui[i] = value[i].real;
}
} break;
default: {}
default: {
}
}
}
@ -2962,7 +2965,8 @@ _FORCE_INLINE_ static void _fill_std140_ubo_empty(ShaderLanguage::DataType type,
zeromem(data, 64);
} break;
default: {}
default: {
}
}
}
@ -5246,7 +5250,8 @@ void RasterizerStorageGLES3::light_set_param(RID p_light, VS::LightParam p_param
light->version++;
light->instance_change_notify(true, false);
} break;
default: {}
default: {
}
}
light->param[p_param] = p_value;
@ -5448,7 +5453,8 @@ AABB RasterizerStorageGLES3::light_get_aabb(RID p_light) const {
return AABB();
} break;
default: {}
default: {
}
}
ERR_FAIL_V(AABB());
@ -7379,7 +7385,8 @@ void RasterizerStorageGLES3::render_target_set_flag(RID p_render_target, RenderT
_render_target_allocate(rt);
} break;
default: {}
default: {
}
}
}
bool RasterizerStorageGLES3::render_target_was_used(RID p_render_target) {

View file

@ -289,7 +289,9 @@ private:
glUniformMatrix4fv(p_uniform, 1, false, matrix);
} break;
default: { ERR_FAIL(); } // do nothing
default: {
ERR_FAIL();
} // do nothing
}
}

View file

@ -54,7 +54,8 @@ int SemaphoreWindows::get() const {
case WAIT_TIMEOUT: {
return 0;
} break;
default: {}
default: {
}
}
ERR_FAIL_V(-1);

View file

@ -166,7 +166,8 @@ Transform Collada::Node::compute_transform(Collada &state) const {
}
} break;
default: {}
default: {
}
}
xform = xform * xform_step;

View file

@ -160,7 +160,9 @@ void ConnectDialog::_add_bind() {
case Variant::BASIS: value = Basis(); break;
case Variant::TRANSFORM: value = Transform(); break;
case Variant::COLOR: value = Color(); break;
default: { ERR_FAIL(); } break;
default: {
ERR_FAIL();
} break;
}
ERR_FAIL_COND(value.get_type() == Variant::NIL);

View file

@ -199,7 +199,8 @@ void DocDump::dump(const String &p_file) {
case Variant::ARRAY:
case Variant::_RID:
default: {}
default: {
}
}
_write_string(f, 3, "<argument index=\"" + itos(i) + "\" name=\"" + _escape_string(arginfo.name) + "\" type=\"" + type_name + "\" default=\"" + _escape_string(default_arg_text) + "\">");
@ -227,7 +228,8 @@ void DocDump::dump(const String &p_file) {
}
break;
case PROPERTY_HINT_FILE: hint = "A file:"; break;
default: {}
default: {
}
//case PROPERTY_HINT_RESOURCE_TYPE: hint="Type: "+arginfo.hint_string; break;
};
if (hint != "")

View file

@ -924,7 +924,8 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool>
ret_changed = true;
}
} break;
default: {}
default: {
}
}
}

View file

@ -2883,7 +2883,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
case PROPERTY_HINT_LAYERS_3D_PHYSICS:
lt = EditorPropertyLayers::LAYER_PHYSICS_3D;
break;
default: {} //compiler could be smarter here and realize this can't happen
default: {
} //compiler could be smarter here and realize this can't happen
}
EditorPropertyLayers *editor = memnew(EditorPropertyLayers);
editor->setup(lt);
@ -3020,7 +3021,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
case PROPERTY_HINT_PROPERTY_OF_BASE_TYPE: type = EditorPropertyMember::MEMBER_PROPERTY_OF_BASE_TYPE; break;
case PROPERTY_HINT_PROPERTY_OF_INSTANCE: type = EditorPropertyMember::MEMBER_PROPERTY_OF_INSTANCE; break;
case PROPERTY_HINT_PROPERTY_OF_SCRIPT: type = EditorPropertyMember::MEMBER_PROPERTY_OF_SCRIPT; break;
default: {}
default: {
}
}
editor->setup(type, p_hint_text);
add_property_editor(p_path, editor);
@ -3284,7 +3286,8 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
editor->setup(Variant::POOL_COLOR_ARRAY);
add_property_editor(p_path, editor);
} break;
default: {}
default: {
}
}
return false; //can be overridden, although it will most likely be last anyway

View file

@ -251,7 +251,8 @@ void EditorPropertyArray::update_property() {
case Variant::POOL_COLOR_ARRAY: {
arrtype = "PoolColorArray";
} break;
default: {}
default: {
}
}
if (array.get_type() == Variant::NIL) {
@ -862,7 +863,8 @@ void EditorPropertyDictionary::update_property() {
editor->setup(Variant::POOL_COLOR_ARRAY);
prop = editor;
} break;
default: {}
default: {
}
}
if (i == amount) {

View file

@ -581,7 +581,9 @@ int EditorSceneImporterGLTF::_get_component_type_size(int component_type) {
case COMPONENT_TYPE_UNSIGNED_SHORT: return 2; break;
case COMPONENT_TYPE_INT: return 4; break;
case COMPONENT_TYPE_FLOAT: return 4; break;
default: { ERR_FAIL_V(0); }
default: {
ERR_FAIL_V(0);
}
}
return 0;
}
@ -631,7 +633,8 @@ Vector<double> EditorSceneImporterGLTF::_decode_accessor(GLTFState &state, int p
element_size = 16; //override for this case
}
} break;
default: {}
default: {
}
}
Vector<double> dst_buffer;

View file

@ -105,7 +105,8 @@ void OutputStrings::_notification(int p_what) {
case LINE_LINK: {
} break;
default: {}
default: {
}
}
line_ofs.y += font->get_ascent();

View file

@ -200,7 +200,8 @@ void AnimationTreePlayerEditor::_edit_dialog_changed() {
if (anim_tree->transition_node_get_current(edited_node) != edit_option->get_selected())
anim_tree->transition_node_set_current(edited_node, edit_option->get_selected());
} break;
default: {}
default: {
}
}
}
@ -457,7 +458,8 @@ void AnimationTreePlayerEditor::_popup_edit_dialog() {
edit_dialog->set_size(Size2(150, 100));
} break;
default: {}
default: {
}
}
}
@ -555,7 +557,8 @@ void AnimationTreePlayerEditor::_draw_node(const StringName &p_node) {
text += "->";
break;
default: {}
default: {
}
}
font->draw(ci, ofs + ascofs + Point2(3, 0), text, font_color);
@ -740,7 +743,8 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) {
//open editor
//_node_edit_property(click_node);
} break;
default: {}
default: {
}
}
}
if (mb->get_button_index() == 2) {
@ -817,7 +821,8 @@ void AnimationTreePlayerEditor::_gui_input(Ref<InputEvent> p_event) {
anim_tree->node_set_position(click_node, new_pos);
} break;
default: {}
default: {
}
}
click_type = CLICK_NONE;

View file

@ -454,7 +454,8 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
progress->set_max(1);
progress->set_value(0);
} break;
default: {}
default: {
}
}
prev_status = cstatus;
}
@ -612,7 +613,8 @@ void EditorAssetLibrary::_notification(int p_what) {
case HTTPClient::STATUS_BODY: {
load_status->set_value(0.4);
} break;
default: {}
default: {
}
}
}

View file

@ -50,7 +50,8 @@ void BakedLightmapEditorPlugin::_bake() {
case BakedLightmap::BAKE_ERROR_CANT_CREATE_IMAGE:
EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable."));
break;
default: {}
default: {
}
}
}
}

View file

@ -61,7 +61,8 @@ void MeshLibraryEditor::_menu_confirm() {
_import_scene_cbk(existing);
} break;
default: {};
default: {
};
}
}

View file

@ -905,7 +905,8 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
bone_paint_pos = Vector2(mm->get_position().x, mm->get_position().y);
} break;
default: {}
default: {
}
}
if (bone_painting) {

View file

@ -1637,7 +1637,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
surface->update();
} break;
default: {}
default: {
}
}
}
@ -1704,7 +1705,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
default: {}
default: {
}
}
}
@ -1760,7 +1762,8 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} break;
default: {}
default: {
}
}
}

View file

@ -770,7 +770,8 @@ void TileSetEditor::_on_edit_mode_changed(int p_edit_mode) {
spin_z_index->show();
}
} break;
default: {}
default: {
}
}
_update_toggle_shape_button();
workspace->update();
@ -940,7 +941,8 @@ void TileSetEditor::_on_workspace_draw() {
spin_z_index->set_value(tileset->autotile_get_z_index(get_current_tile(), edited_shape_coord));
draw_highlight_subtile(edited_shape_coord);
} break;
default: {}
default: {
}
}
}
@ -1570,7 +1572,8 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
}
} break;
default: {}
default: {
}
}
}
}
@ -1724,7 +1727,8 @@ void TileSetEditor::_on_tool_clicked(int p_tool) {
undo_redo->commit_action();
}
} break;
default: {}
default: {
}
}
}
} else if (p_tool == TOOL_SELECT) {
@ -1894,7 +1898,8 @@ void TileSetEditor::_select_next_tile() {
edited_shape_coord = Vector2();
_select_edited_shape_coord();
} break;
default: {}
default: {
}
}
}
}
@ -1931,7 +1936,8 @@ void TileSetEditor::_select_previous_tile() {
edited_shape_coord = cell_count;
_select_edited_shape_coord();
} break;
default: {}
default: {
}
}
}
}
@ -2668,7 +2674,8 @@ void TileSetEditor::draw_polygon_shapes() {
}
}
} break;
default: {}
default: {
}
}
if (creating_shape) {

View file

@ -453,7 +453,8 @@ void VisualShaderEditor::_update_graph() {
Vector3 v = default_value;
button->set_text(String::num(v.x, 3) + "," + String::num(v.y, 3) + "," + String::num(v.z, 3));
} break;
default: {}
default: {
}
}
}

View file

@ -294,7 +294,8 @@ void ProjectSettingsEditor::_device_input_add() {
ie = jb;
} break;
default: {}
default: {
}
}
if (idx < 0 || idx >= events.size()) {
@ -519,7 +520,8 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even
}
} break;
default: {}
default: {
}
}
}

View file

@ -310,7 +310,8 @@ void CustomPropertyEditor::_menu_option(int p_which) {
}
} break;
default: {}
default: {
}
}
}
@ -1049,7 +1050,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
case Variant::POOL_COLOR_ARRAY: {
} break;
default: {}
default: {
}
}
updating = false;
@ -1091,7 +1093,8 @@ void CustomPropertyEditor::_file_selected(String p_file) {
emit_signal("variant_changed");
hide();
} break;
default: {}
default: {
}
}
}
@ -1432,7 +1435,8 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
} break;
default: {};
default: {
};
}
}
@ -1699,7 +1703,8 @@ void CustomPropertyEditor::_modified(String p_string) {
case Variant::POOL_COLOR_ARRAY: {
} break;
default: {}
default: {
}
}
updating = false;
@ -1753,7 +1758,8 @@ void CustomPropertyEditor::_focus_enter() {
}
}
} break;
default: {}
default: {
}
}
}
@ -1774,7 +1780,8 @@ void CustomPropertyEditor::_focus_exit() {
value_editor[i]->select(0, 0);
}
} break;
default: {}
default: {
}
}
}

View file

@ -154,7 +154,8 @@ float Performance::get_monitor(Monitor p_monitor) const {
case PHYSICS_3D_ISLAND_COUNT: return PhysicsServer::get_singleton()->get_process_info(PhysicsServer::INFO_ISLAND_COUNT);
case AUDIO_OUTPUT_LATENCY: return AudioServer::get_singleton()->get_output_latency();
default: {}
default: {
}
}
return 0;

View file

@ -284,7 +284,8 @@ static String _parser_expr(const GDScriptParser::Node *p_expr) {
case GDScriptParser::OperatorNode::OP_BIT_XOR: {
txt = _parser_expr(c_node->arguments[0]) + "^" + _parser_expr(c_node->arguments[1]);
} break;
default: {}
default: {
}
}
} break;

View file

@ -432,7 +432,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
} break;
default: {}
default: {
}
}
wb = PoolVector<uint8_t>::Write();

View file

@ -690,7 +690,9 @@ size_t NetworkedMultiplayerENet::enet_compress(void *context, const ENetBuffer *
case COMPRESS_ZSTD: {
mode = Compression::MODE_ZSTD;
} break;
default: { ERR_FAIL_V(0); }
default: {
ERR_FAIL_V(0);
}
}
int req_size = Compression::get_max_compressed_buffer_size(ofs, mode);
@ -727,7 +729,8 @@ size_t NetworkedMultiplayerENet::enet_decompress(void *context, const enet_uint8
ret = Compression::decompress(outData, outLimit, inData, inLimit, Compression::MODE_ZSTD);
} break;
default: {}
default: {
}
}
if (ret < 0) {
return 0;

View file

@ -115,7 +115,8 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
case Image::FORMAT_RGBA5551: {
detected_channels = Image::DETECTED_RGBA;
} break;
default: {}
default: {
}
}
}

View file

@ -1070,7 +1070,8 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
case GDScriptParser::OperatorNode::OP_BIT_AND: vop = Variant::OP_BIT_AND; break;
case GDScriptParser::OperatorNode::OP_BIT_OR: vop = Variant::OP_BIT_OR; break;
case GDScriptParser::OperatorNode::OP_BIT_XOR: vop = Variant::OP_BIT_XOR; break;
default: {}
default: {
}
}
if (vop == Variant::OP_MAX) {
@ -1125,7 +1126,8 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
} break;
}
} break;
default: {}
default: {
}
}
// It may have found a null, but that's never useful
@ -3380,7 +3382,8 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
return OK;
}
} break;
default: {}
default: {
}
}
return ERR_CANT_RESOLVE;

View file

@ -888,7 +888,8 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
case GDScriptTokenizer::TK_OP_SUB: e.op = OperatorNode::OP_NEG; break;
case GDScriptTokenizer::TK_OP_NOT: e.op = OperatorNode::OP_NOT; break;
case GDScriptTokenizer::TK_OP_BIT_INVERT: e.op = OperatorNode::OP_BIT_INVERT; break;
default: {}
default: {
}
}
tokenizer->advance();
@ -1875,7 +1876,9 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
}
} break;
default: { break; }
default: {
break;
}
}
//now se if all are constants
if (!all_constants)
@ -1988,7 +1991,9 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
return op->arguments[2];
}
} break;
default: { ERR_FAIL_V(op); }
default: {
ERR_FAIL_V(op);
}
}
ERR_FAIL_V(op);
@ -6351,7 +6356,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::COLOR: {
error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::STRING;
} break;
default: {}
default: {
}
}
}
if (error) {
@ -6469,7 +6475,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
}
}
} break;
default: {}
default: {
}
}
p_node->set_datatype(_resolve_type(node_type, p_node->line));

View file

@ -339,7 +339,8 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const {
return "null";
case Variant::BOOL:
return value ? "true" : "false";
default: {}
default: {
}
}
}
case TK_OP_AND:
@ -1302,7 +1303,8 @@ Vector<uint8_t> GDScriptTokenizerBuffer::parse_code_string(const String &p_code)
ERR_FAIL_V(Vector<uint8_t>());
} break;
default: {}
default: {
}
};
token_array.push_back(token);

View file

@ -2520,7 +2520,8 @@ void BindingsGenerator::_default_argument_from_variant(const Variant &p_val, Arg
r_iarg.default_argument = Variant::get_type_name(p_val.get_type()) + ".Identity";
r_iarg.def_param_mode = ArgumentInterface::NULLABLE_VAL;
break;
default: {}
default: {
}
}
if (r_iarg.def_param_mode == ArgumentInterface::CONSTANT && r_iarg.type.cname == name_cache.type_Variant && r_iarg.default_argument != "null")

View file

@ -119,7 +119,8 @@ void image_compress_squish(Image *p_image, float p_lossy_quality, Image::Compres
case Image::FORMAT_RGBA5551: {
dc = Image::DETECTED_RGBA;
} break;
default: {}
default: {
}
}
}

View file

@ -1287,7 +1287,8 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
*r_return = String(color);
} break;
default: {}
default: {
}
}
}

View file

@ -1032,7 +1032,8 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
case TK_OP_BIT_OR: op = Variant::OP_BIT_OR; break;
case TK_OP_BIT_XOR: op = Variant::OP_BIT_XOR; break;
case TK_OP_BIT_INVERT: op = Variant::OP_BIT_NEGATE; break;
default: {};
default: {
};
}
if (op == Variant::OP_MAX) { //stop appending stuff

View file

@ -1562,7 +1562,8 @@ public:
case VisualScriptPropertySet::ASSIGN_OP_BIT_XOR: {
value = Variant::evaluate(Variant::OP_BIT_XOR, value, p_argument);
} break;
default: {}
default: {
}
}
if (index != StringName()) {

View file

@ -32,6 +32,7 @@ package org.godotengine.godot;
//import android.R;
import android.Manifest;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
@ -53,7 +54,6 @@ import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.Manifest;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
@ -75,7 +75,6 @@ import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.google.android.vending.expansion.downloader.DownloadProgressInfo;
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
import com.google.android.vending.expansion.downloader.DownloaderServiceMarshaller;
@ -83,10 +82,6 @@ import com.google.android.vending.expansion.downloader.Helpers;
import com.google.android.vending.expansion.downloader.IDownloaderClient;
import com.google.android.vending.expansion.downloader.IDownloaderService;
import com.google.android.vending.expansion.downloader.IStub;
import org.godotengine.godot.input.GodotEditText;
import org.godotengine.godot.payments.PaymentsManager;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
@ -96,8 +91,9 @@ import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import javax.microedition.khronos.opengles.GL10;
import org.godotengine.godot.input.GodotEditText;
import org.godotengine.godot.payments.PaymentsManager;
public class Godot extends Activity implements SensorEventListener, IDownloaderClient {

View file

@ -30,13 +30,12 @@
package org.godotengine.godot;
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.util.Log;
import com.google.android.vending.expansion.downloader.DownloaderClientMarshaller;
/**
* You should start your derived downloader class when this receiver gets the message

View file

@ -33,7 +33,6 @@ package org.godotengine.godot;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import com.google.android.vending.expansion.downloader.impl.DownloaderService;
/**

View file

@ -29,28 +29,27 @@
/*************************************************************************/
package org.godotengine.godot;
import java.util.HashMap;
import java.util.Locale;
import android.net.Uri;
import android.content.Intent;
import android.content.res.AssetManager;
import java.io.InputStream;
import java.io.IOException;
import android.app.*;
import android.content.*;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.res.AssetManager;
import android.graphics.*;
import android.hardware.*;
import android.media.*;
import android.net.Uri;
import android.os.*;
import android.text.*;
import android.text.method.*;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.SparseArray;
import android.view.*;
import android.view.inputmethod.InputMethodManager;
import android.os.*;
import android.util.Log;
import android.util.DisplayMetrics;
import android.graphics.*;
import android.text.method.*;
import android.text.*;
import android.media.*;
import android.hardware.*;
import android.content.*;
import android.content.pm.ActivityInfo;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Locale;
import org.godotengine.godot.input.*;
//android.os.Build

View file

@ -32,14 +32,12 @@ package org.godotengine.godot;
import android.app.Activity;
import android.util.Log;
import org.godotengine.godot.payments.PaymentsManager;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.godotengine.godot.payments.PaymentsManager;
import org.json.JSONException;
import org.json.JSONObject;
public class GodotPaymentV3 extends Godot.SingletonBase {

View file

@ -31,16 +31,15 @@
package org.godotengine.godot;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.ContextWrapper;
import android.graphics.PixelFormat;
import android.hardware.input.InputManager;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;
import android.util.Log;
import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.content.ContextWrapper;
import android.view.InputDevice;
import android.hardware.input.InputManager;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
@ -51,7 +50,6 @@ import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.opengles.GL10;
import org.godotengine.godot.input.InputManagerCompat;
import org.godotengine.godot.input.InputManagerCompat.InputDeviceListener;
/**

View file

@ -30,16 +30,15 @@
package org.godotengine.godot.input;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;
import org.godotengine.godot.*;
import android.os.Handler;
import android.os.Message;
import android.view.inputmethod.InputMethodManager;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import java.lang.ref.WeakReference;
import org.godotengine.godot.*;
public class GodotEditText extends EditText {
// ===========================================================

View file

@ -23,7 +23,6 @@ import android.os.Build;
import android.os.Handler;
import android.view.InputDevice;
import android.view.MotionEvent;
import java.util.HashMap;
import java.util.Map;

View file

@ -30,13 +30,11 @@
package org.godotengine.godot.payments;
import com.android.vending.billing.IInAppBillingService;
import android.content.Context;
import android.os.AsyncTask;
import android.os.RemoteException;
import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import java.lang.ref.WeakReference;
abstract public class ConsumeTask {

View file

@ -30,13 +30,6 @@
package org.godotengine.godot.payments;
import org.json.JSONException;
import org.json.JSONObject;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.utils.Crypt;
import com.android.vending.billing.IInAppBillingService;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.ProgressDialog;
@ -47,6 +40,11 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.utils.Crypt;
import org.json.JSONException;
import org.json.JSONObject;
abstract public class HandlePurchaseTask {

View file

@ -40,17 +40,14 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import java.util.ArrayList;
import java.util.Arrays;
import org.godotengine.godot.Godot;
import org.godotengine.godot.GodotPaymentV3;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Arrays;
public class PaymentsManager {
public static final int BILLING_RESPONSE_RESULT_OK = 0;

View file

@ -30,13 +30,6 @@
package org.godotengine.godot.payments;
import org.json.JSONException;
import org.json.JSONObject;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.utils.Crypt;
import com.android.vending.billing.IInAppBillingService;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.ProgressDialog;
@ -47,6 +40,11 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.utils.Crypt;
import org.json.JSONException;
import org.json.JSONObject;
abstract public class PurchaseTask {

View file

@ -34,14 +34,11 @@ import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import org.json.JSONException;
import org.json.JSONObject;
abstract public class ReleaseAllConsumablesTask {

View file

@ -30,17 +30,6 @@
package org.godotengine.godot.payments;
import org.json.JSONException;
import org.json.JSONObject;
import org.godotengine.godot.Godot;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.GodotPaymentV3;
import org.godotengine.godot.utils.Crypt;
import org.godotengine.godot.utils.HttpRequester;
import org.godotengine.godot.utils.RequestParams;
import com.android.vending.billing.IInAppBillingService;
import android.app.Activity;
import android.app.PendingIntent;
import android.app.ProgressDialog;
@ -51,8 +40,16 @@ import android.os.AsyncTask;
import android.os.Bundle;
import android.os.RemoteException;
import android.util.Log;
import com.android.vending.billing.IInAppBillingService;
import java.lang.ref.WeakReference;
import org.godotengine.godot.Godot;
import org.godotengine.godot.GodotLib;
import org.godotengine.godot.GodotPaymentV3;
import org.godotengine.godot.utils.Crypt;
import org.godotengine.godot.utils.HttpRequester;
import org.godotengine.godot.utils.RequestParams;
import org.json.JSONException;
import org.json.JSONObject;
abstract public class ValidateTask {

View file

@ -37,10 +37,8 @@ import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import org.apache.http.conn.ssl.SSLSocketFactory;
/**

View file

@ -30,6 +30,9 @@
package org.godotengine.godot.utils;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@ -39,7 +42,6 @@ import java.security.KeyStore;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.http.HttpResponse;
import org.apache.http.HttpVersion;
import org.apache.http.NameValuePair;
@ -64,10 +66,6 @@ import org.apache.http.params.HttpProtocolParams;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
/**
*
* @author Luis Linietsky <luis.linietsky@gmail.com>

View file

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

View file

@ -670,7 +670,9 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
mb->set_button_index(BUTTON_XBUTTON2);
mb->set_doubleclick(true);
} break;
default: { return 0; }
default: {
return 0;
}
}
mb->set_control((wParam & MK_CONTROL) != 0);

View file

@ -1405,7 +1405,8 @@ Vector2 TileMap::_map_to_world(int p_x, int p_y, bool p_ignore_ofs) const {
ret += get_cell_transform()[1] * (half_offset == HALF_OFFSET_Y ? 0.5 : -0.5);
}
} break;
default: {}
default: {
}
}
}
return ret;
@ -1480,7 +1481,8 @@ Vector2 TileMap::world_to_map(const Vector2 &p_pos) const {
ret.y += 0.5;
}
} break;
default: {}
default: {
}
}
// Account for precision errors on the border (GH-23250).

View file

@ -293,7 +293,8 @@ Light::Light(VisualServer::LightType p_type) {
case VS::LIGHT_DIRECTIONAL: light = VisualServer::get_singleton()->directional_light_create(); break;
case VS::LIGHT_OMNI: light = VisualServer::get_singleton()->omni_light_create(); break;
case VS::LIGHT_SPOT: light = VisualServer::get_singleton()->spot_light_create(); break;
default: {};
default: {
};
}
VS::get_singleton()->instance_set_base(get_instance(), light);

View file

@ -224,7 +224,8 @@ void Spatial::_notification(int p_what) {
#endif
} break;
default: {}
default: {
}
}
}

View file

@ -309,7 +309,8 @@ void AnimationCache::set_all(float p_time, float p_delta) {
}
} break;
default: {}
default: {
}
}
}
}

View file

@ -1276,7 +1276,8 @@ void AnimationTree::_process_graph(float p_delta) {
t->object->set_indexed(t->subpath, t->value);
} break;
default: {} //the rest don't matter
default: {
} //the rest don't matter
}
}
}

View file

@ -193,7 +193,8 @@ bool AnimationTreePlayer::_set(const StringName &p_name, const Variant &p_value)
}
} break;
default: {};
default: {
};
}
}
@ -352,7 +353,8 @@ bool AnimationTreePlayer::_get(const StringName &p_name, Variant &r_ret) const {
node["transitions"] = transitions;
} break;
default: {};
default: {
};
}
nodes.push_back(node);
@ -772,7 +774,8 @@ float AnimationTreePlayer::_process_node(const StringName &p_node, AnimationNode
}
} break;
default: {}
default: {
}
}
return 0;
@ -882,7 +885,8 @@ void AnimationTreePlayer::_process_animation(float p_delta) {
tr.track->object->call(method, args[0], args[1], args[2], args[3], args[4]);
}
} break;
default: {}
default: {
}
}
}
}
@ -969,7 +973,8 @@ void AnimationTreePlayer::add_node(NodeType p_type, const StringName &p_node) {
n = memnew(TransitionNode);
} break;
default: {}
default: {
}
}
//n->name+=" "+itos(p_node);

View file

@ -86,7 +86,9 @@ void FileDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
_dir_entered("..");
} break;
default: { handled = false; }
default: {
handled = false;
}
}
if (handled)

View file

@ -711,7 +711,8 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
} break;
default: {}
default: {
}
}
Item *itp = it;

View file

@ -962,7 +962,8 @@ int Tree::compute_item_height(TreeItem *p_item) const {
}
} break;
default: {}
default: {
}
}
}
int item_min_height = p_item->get_custom_minimum_height();
@ -2020,7 +2021,9 @@ void Tree::text_editor_enter(String p_text) {
//popup_edited_item->edited_signal.call( popup_edited_item_col );
} break;
default: { ERR_FAIL(); }
default: {
ERR_FAIL();
}
}
item_edited(popup_edited_item_col, popup_edited_item);

View file

@ -1459,7 +1459,8 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
_find_resources(v);
}
} break;
default: {}
default: {
}
}
}

View file

@ -553,10 +553,10 @@ ProceduralSky::ProceduralSky(bool p_desaturate) {
ground_energy = 1;
if (p_desaturate) {
sky_top_color.set_hsv(sky_top_color.get_h(),0,sky_top_color.get_v());
sky_horizon_color.set_hsv(sky_horizon_color.get_h(),0,sky_horizon_color.get_v());
ground_bottom_color.set_hsv(ground_bottom_color.get_h(),0,ground_bottom_color.get_v());
ground_horizon_color.set_hsv(ground_horizon_color.get_h(),0,ground_horizon_color.get_v());
sky_top_color.set_hsv(sky_top_color.get_h(), 0, sky_top_color.get_v());
sky_horizon_color.set_hsv(sky_horizon_color.get_h(), 0, sky_horizon_color.get_v());
ground_bottom_color.set_hsv(ground_bottom_color.get_h(), 0, ground_bottom_color.get_v());
ground_horizon_color.set_hsv(ground_horizon_color.get_h(), 0, ground_horizon_color.get_v());
}
sun_color = Color(1, 1, 1);
sun_latitude = 35;

View file

@ -191,7 +191,7 @@ public:
virtual RID get_rid() const;
ProceduralSky(bool p_desaturate=false);
ProceduralSky(bool p_desaturate = false);
~ProceduralSky();
};

View file

@ -397,7 +397,8 @@ Array SurfaceTool::commit_to_arrays() {
a[i] = array;
} break;
default: {}
default: {
}
}
}

View file

@ -839,7 +839,8 @@ Error VisualShader::_write_node(Type type, StringBuilder &global_code, StringBui
case VisualShaderNode::PORT_TYPE_VECTOR: code += String() + "\tvec3 " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_BOOLEAN: code += String() + "\tbool " + outputs[i] + ";\n"; break;
case VisualShaderNode::PORT_TYPE_TRANSFORM: code += String() + "\tmat4 " + outputs[i] + ";\n"; break;
default: {}
default: {
}
}
}

View file

@ -196,7 +196,8 @@ void BodySW::set_param(PhysicsServer::BodyParameter p_param, real_t p_value) {
angular_damp = p_value;
} break;
default: {}
default: {
}
}
}
@ -226,7 +227,8 @@ real_t BodySW::get_param(PhysicsServer::BodyParameter p_param) const {
return angular_damp;
} break;
default: {}
default: {
}
}
return 0;
@ -474,7 +476,8 @@ void BodySW::integrate_forces(real_t p_step) {
_compute_area_gravity_and_dampenings(aa[i].area);
stopped = mode == PhysicsServer::AREA_SPACE_OVERRIDE_REPLACE;
} break;
default: {}
default: {
}
}
}
}

View file

@ -174,7 +174,8 @@ void Body2DSW::set_param(Physics2DServer::BodyParameter p_param, real_t p_value)
angular_damp = p_value;
} break;
default: {}
default: {
}
}
}
@ -206,7 +207,8 @@ real_t Body2DSW::get_param(Physics2DServer::BodyParameter p_param) const {
return angular_damp;
} break;
default: {}
default: {
}
}
return 0;
@ -443,7 +445,8 @@ void Body2DSW::integrate_forces(real_t p_step) {
_compute_area_gravity_and_dampenings(aa[i].area);
stopped = mode == Physics2DServer::AREA_SPACE_OVERRIDE_REPLACE;
} break;
default: {}
default: {
}
}
}
}

View file

@ -3620,7 +3620,8 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
case TYPE_FLOAT: {
nv.real = -cn->values[i].real;
} break;
default: {}
default: {
}
}
values.push_back(nv);
@ -4822,7 +4823,8 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct
case TYPE_MAT2: limit = 2; break;
case TYPE_MAT3: limit = 3; break;
case TYPE_MAT4: limit = 4; break;
default: {}
default: {
}
}
for (int i = 0; i < limit; i++) {

View file

@ -399,7 +399,8 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
VSG::scene_render->free(gi_probe->probe_instance);
} break;
default: {}
default: {
}
}
if (instance->base_data) {
@ -476,7 +477,8 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
gi_probe->probe_instance = VSG::scene_render->gi_probe_instance_create();
} break;
default: {}
default: {
}
}
VSG::storage->instance_add_dependency(p_base, instance);
@ -524,7 +526,8 @@ void VisualServerScene::instance_set_scenario(RID p_instance, RID p_scenario) {
gi_probe_update_list.remove(&gi_probe->update_element);
}
} break;
default: {}
default: {
}
}
instance->scenario = NULL;
@ -556,7 +559,8 @@ void VisualServerScene::instance_set_scenario(RID p_instance, RID p_scenario) {
gi_probe_update_list.add(&gi_probe->update_element);
}
} break;
default: {}
default: {
}
}
_instance_queue_update(instance, true, true);
@ -671,7 +675,8 @@ void VisualServerScene::instance_set_visible(RID p_instance, bool p_visible) {
}
} break;
default: {}
default: {
}
}
}
inline bool is_geometry_instance(VisualServer::InstanceType p_type) {
@ -848,7 +853,8 @@ void VisualServerScene::instance_geometry_set_flag(RID p_instance, VS::InstanceF
instance->redraw_if_visible = p_enabled;
} break;
default: {}
default: {
}
}
}
void VisualServerScene::instance_geometry_set_cast_shadows_setting(RID p_instance, VS::ShadowCastingSetting p_shadow_casting_setting) {
@ -1040,7 +1046,8 @@ void VisualServerScene::_update_instance_aabb(Instance *p_instance) {
new_aabb = VSG::storage->lightmap_capture_get_bounds(p_instance->base);
} break;
default: {}
default: {
}
}
// <Zylann> This is why I didn't re-use Instance::aabb to implement custom AABBs