You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
This commit is contained in:
@@ -547,7 +547,7 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam
|
||||
|
||||
void EditorNode::_resources_changed(const Vector<String> &p_resources) {
|
||||
|
||||
List<Ref<Resource> > changed;
|
||||
List<Ref<Resource>> changed;
|
||||
|
||||
int rc = p_resources.size();
|
||||
for (int i = 0; i < rc; i++) {
|
||||
@@ -573,7 +573,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) {
|
||||
}
|
||||
|
||||
if (changed.size()) {
|
||||
for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) {
|
||||
for (List<Ref<Resource>>::Element *E = changed.front(); E; E = E->next()) {
|
||||
E->get()->reload_from_file();
|
||||
}
|
||||
}
|
||||
@@ -1210,7 +1210,7 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource> > &edited_resources) {
|
||||
static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource>> &edited_resources) {
|
||||
|
||||
if (p_resource->is_edited()) {
|
||||
edited_resources.insert(p_resource);
|
||||
@@ -1247,11 +1247,11 @@ int EditorNode::_save_external_resources() {
|
||||
flg |= ResourceSaver::FLAG_COMPRESS;
|
||||
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
|
||||
|
||||
Set<Ref<Resource> > edited_subresources;
|
||||
Set<Ref<Resource>> edited_subresources;
|
||||
int saved = 0;
|
||||
List<Ref<Resource> > cached;
|
||||
List<Ref<Resource>> cached;
|
||||
ResourceCache::get_cached_resources(&cached);
|
||||
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
|
||||
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
|
||||
|
||||
Ref<Resource> res = E->get();
|
||||
if (!res->get_path().is_resource_file())
|
||||
@@ -1266,7 +1266,7 @@ int EditorNode::_save_external_resources() {
|
||||
// clear later, because user may have put the same subresource in two different resources,
|
||||
// which will be shared until the next reload
|
||||
|
||||
for (Set<Ref<Resource> >::Element *E = edited_subresources.front(); E; E = E->next()) {
|
||||
for (Set<Ref<Resource>>::Element *E = edited_subresources.front(); E; E = E->next()) {
|
||||
Ref<Resource> res = E->get();
|
||||
res->set_edited(false);
|
||||
}
|
||||
@@ -3333,7 +3333,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
||||
|
||||
dependency_errors.erase(lpath); //at least not self path
|
||||
|
||||
for (Map<String, Set<String> >::Element *E = dependency_errors.front(); E; E = E->next()) {
|
||||
for (Map<String, Set<String>>::Element *E = dependency_errors.front(); E; E = E->next()) {
|
||||
|
||||
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E->key()) + "\n";
|
||||
for (Set<String>::Element *F = E->get().front(); F; F = F->next()) {
|
||||
@@ -3787,8 +3787,8 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
|
||||
return icon;
|
||||
}
|
||||
|
||||
const Map<String, Vector<EditorData::CustomType> > &p_map = EditorNode::get_editor_data().get_custom_types();
|
||||
for (const Map<String, Vector<EditorData::CustomType> >::Element *E = p_map.front(); E; E = E->next()) {
|
||||
const Map<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types();
|
||||
for (const Map<String, Vector<EditorData::CustomType>>::Element *E = p_map.front(); E; E = E->next()) {
|
||||
const Vector<EditorData::CustomType> &ct = E->value();
|
||||
for (int i = 0; i < ct.size(); ++i) {
|
||||
if (ct[i].name == p_class) {
|
||||
@@ -5120,10 +5120,10 @@ void EditorNode::reload_scene(const String &p_path) {
|
||||
|
||||
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
|
||||
|
||||
List<Ref<Resource> > cached;
|
||||
List<Ref<Resource>> cached;
|
||||
ResourceCache::get_cached_resources(&cached);
|
||||
List<Ref<Resource> > to_clear; //clear internal resources from previous scene from being used
|
||||
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
|
||||
List<Ref<Resource>> to_clear; //clear internal resources from previous scene from being used
|
||||
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
|
||||
|
||||
if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene
|
||||
to_clear.push_back(E->get());
|
||||
@@ -5254,9 +5254,9 @@ void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConve
|
||||
resource_conversion_plugins.erase(p_plugin);
|
||||
}
|
||||
|
||||
Vector<Ref<EditorResourceConversionPlugin> > EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
|
||||
Vector<Ref<EditorResourceConversionPlugin>> EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
|
||||
|
||||
Vector<Ref<EditorResourceConversionPlugin> > ret;
|
||||
Vector<Ref<EditorResourceConversionPlugin>> ret;
|
||||
|
||||
for (int i = 0; i < resource_conversion_plugins.size(); i++) {
|
||||
if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) {
|
||||
|
||||
Reference in New Issue
Block a user