scalagen icon indicating copy to clipboard operation
scalagen copied to clipboard

Improve for/if handling

Open timowest opened this issue 12 years ago • 0 comments

  for (p <- paths) {
    if (p.contains(".svn")) {
      //continue
    } else if (suffix == null || p.endsWith(suffix)) {
      additions.add(new Resource(p, false, false))
    }
  }

should be translated as

  for (p <- paths if !p.contains(".svn") && (suffix == null || p.endsWith(suffix))) {
    additions.add(new Resource(p, false, false))
  }

timowest avatar Jan 17 '12 21:01 timowest