You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
This commit is contained in:
@@ -398,6 +398,7 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
|
||||
VSG::scene_render->free(gi_probe->probe_instance);
|
||||
|
||||
} break;
|
||||
default: {}
|
||||
}
|
||||
|
||||
if (instance->base_data) {
|
||||
@@ -471,6 +472,7 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
|
||||
gi_probe->probe_instance = VSG::scene_render->gi_probe_instance_create();
|
||||
|
||||
} break;
|
||||
default: {}
|
||||
}
|
||||
|
||||
VSG::storage->instance_add_dependency(p_base, instance);
|
||||
@@ -518,6 +520,7 @@ void VisualServerScene::instance_set_scenario(RID p_instance, RID p_scenario) {
|
||||
gi_probe_update_list.remove(&gi_probe->update_element);
|
||||
}
|
||||
} break;
|
||||
default: {}
|
||||
}
|
||||
|
||||
instance->scenario = NULL;
|
||||
@@ -549,6 +552,7 @@ void VisualServerScene::instance_set_scenario(RID p_instance, RID p_scenario) {
|
||||
gi_probe_update_list.add(&gi_probe->update_element);
|
||||
}
|
||||
} break;
|
||||
default: {}
|
||||
}
|
||||
|
||||
_instance_queue_update(instance, true, true);
|
||||
@@ -649,6 +653,7 @@ void VisualServerScene::instance_set_visible(RID p_instance, bool p_visible) {
|
||||
}
|
||||
|
||||
} break;
|
||||
default: {}
|
||||
}
|
||||
}
|
||||
inline bool is_geometry_instance(VisualServer::InstanceType p_type) {
|
||||
@@ -825,6 +830,7 @@ void VisualServerScene::instance_geometry_set_flag(RID p_instance, VS::InstanceF
|
||||
instance->redraw_if_visible = p_enabled;
|
||||
|
||||
} break;
|
||||
default: {}
|
||||
}
|
||||
}
|
||||
void VisualServerScene::instance_geometry_set_cast_shadows_setting(RID p_instance, VS::ShadowCastingSetting p_shadow_casting_setting) {
|
||||
@@ -1016,7 +1022,6 @@ void VisualServerScene::_update_instance_aabb(Instance *p_instance) {
|
||||
new_aabb = VSG::storage->lightmap_capture_get_bounds(p_instance->base);
|
||||
|
||||
} break;
|
||||
|
||||
default: {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user