summaryrefslogtreecommitdiff
path: root/vala/valasourcefile.vala
diff options
context:
space:
mode:
authorMaciej Piechotka <uzytkownik2@gmail.com>2016-09-21 12:28:39 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2017-05-03 10:14:58 +0200
commitc2eb0f1fb7894003a894ac0bcc3216b7bb261e5e (patch)
tree7d43ad6e76161bd27855b24947d135be0e7853e7 /vala/valasourcefile.vala
parentb4a34efc2f6a7fa734b103b67e7aff96b200da1d (diff)
downloadvala-c2eb0f1fb7894003a894ac0bcc3216b7bb261e5e.tar.gz
Move to .foreach methods where it does not impact readabilitywip/gee
https://bugzilla.gnome.org/show_bug.cgi?id=704754
Diffstat (limited to 'vala/valasourcefile.vala')
-rw-r--r--vala/valasourcefile.vala15
1 files changed, 9 insertions, 6 deletions
diff --git a/vala/valasourcefile.vala b/vala/valasourcefile.vala
index 04dfeff4c..a8f63c194 100644
--- a/vala/valasourcefile.vala
+++ b/vala/valasourcefile.vala
@@ -199,9 +199,10 @@ public class Vala.SourceFile {
// for correct symbol resolving
var old_using_directives = current_using_directives;
current_using_directives = new ArrayList<UsingDirective> ();
- foreach (var using_directive in old_using_directives) {
+ old_using_directives.foreach ((using_directive) => {
current_using_directives.add (using_directive);
- }
+ return true;
+ });
current_using_directives.add (ns);
}
@@ -232,9 +233,10 @@ public class Vala.SourceFile {
}
public void accept_children (CodeVisitor visitor) {
- foreach (CodeNode node in nodes) {
+ nodes.foreach ((node) => {
node.accept (visitor);
- }
+ return true;
+ });
}
private string get_subdir () {
@@ -382,9 +384,10 @@ public class Vala.SourceFile {
}
public bool check (CodeContext context) {
- foreach (CodeNode node in nodes) {
+ nodes.foreach ((node) => {
node.check (context);
- }
+ return true;
+ });
return true;
}
}