Use C++ iterators for Lists in many situations
This commit is contained in:
parent
b918c4c3ce
commit
4e6efd1b07
218 changed files with 2755 additions and 3004 deletions
|
|
@ -357,9 +357,9 @@ class BindingsGenerator {
|
|||
List<SignalInterface> signals_;
|
||||
|
||||
const MethodInterface *find_method_by_name(const StringName &p_cname) const {
|
||||
for (const List<MethodInterface>::Element *E = methods.front(); E; E = E->next()) {
|
||||
if (E->get().cname == p_cname) {
|
||||
return &E->get();
|
||||
for (const MethodInterface &E : methods) {
|
||||
if (E.cname == p_cname) {
|
||||
return &E;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -367,9 +367,9 @@ class BindingsGenerator {
|
|||
}
|
||||
|
||||
const PropertyInterface *find_property_by_name(const StringName &p_cname) const {
|
||||
for (const List<PropertyInterface>::Element *E = properties.front(); E; E = E->next()) {
|
||||
if (E->get().cname == p_cname) {
|
||||
return &E->get();
|
||||
for (const PropertyInterface &E : properties) {
|
||||
if (E.cname == p_cname) {
|
||||
return &E;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -377,9 +377,9 @@ class BindingsGenerator {
|
|||
}
|
||||
|
||||
const PropertyInterface *find_property_by_proxy_name(const String &p_proxy_name) const {
|
||||
for (const List<PropertyInterface>::Element *E = properties.front(); E; E = E->next()) {
|
||||
if (E->get().proxy_name == p_proxy_name) {
|
||||
return &E->get();
|
||||
for (const PropertyInterface &E : properties) {
|
||||
if (E.proxy_name == p_proxy_name) {
|
||||
return &E;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -387,9 +387,9 @@ class BindingsGenerator {
|
|||
}
|
||||
|
||||
const MethodInterface *find_method_by_proxy_name(const String &p_proxy_name) const {
|
||||
for (const List<MethodInterface>::Element *E = methods.front(); E; E = E->next()) {
|
||||
if (E->get().proxy_name == p_proxy_name) {
|
||||
return &E->get();
|
||||
for (const MethodInterface &E : methods) {
|
||||
if (E.proxy_name == p_proxy_name) {
|
||||
return &E;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -613,9 +613,9 @@ class BindingsGenerator {
|
|||
}
|
||||
|
||||
const ConstantInterface *find_constant_by_name(const String &p_name, const List<ConstantInterface> &p_constants) const {
|
||||
for (const List<ConstantInterface>::Element *E = p_constants.front(); E; E = E->next()) {
|
||||
if (E->get().name == p_name) {
|
||||
return &E->get();
|
||||
for (const ConstantInterface &E : p_constants) {
|
||||
if (E.name == p_name) {
|
||||
return &E;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue