Permalink
Browse files

Get rid of calls to Hash.exists.

  • Loading branch information...
colomon committed Nov 26, 2013
1 parent 48282e6 commit 1c2829edb90d4d81896ac300f6b12c0966ea483a
Showing with 2 additions and 2 deletions.
  1. +1 −1 dg-check.pl
  2. +1 −1 lib/ABC/Utils.pm
View
@@ -33,6 +33,6 @@
my %key_signature = key_signature(%header<K>);
- my @trouble = @notes.map({apply_key_signature(%key_signature, .<pitch>)}).grep({!%dg_notes.exists(lc($_))});
+ my @trouble = @notes.map({apply_key_signature(%key_signature, .<pitch>)}).grep({!%dg_notes{lc($_)}:exists});
say @trouble.perl;
}
View
@@ -43,7 +43,7 @@ package ABC::Utils {
}
else
{
- if %key_signature.exists($pitch<basenote>.uc) {
+ if %key_signature{$pitch<basenote>.uc}:exists {
$resulting_note ~= %key_signature{$pitch<basenote>.uc};
}
}

0 comments on commit 1c2829e

Please sign in to comment.