Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replaced various conditional gyrations with break(). Thanks, Coke++.
Signed-off-by: Austin Hastings <Austin_Hastings@Yahoo.com>
  • Loading branch information
Austin Hastings authored and Austin Hastings committed Mar 27, 2010
1 parent 1160287 commit b98b5c2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Partcl/commands/string.pm
Expand Up @@ -378,18 +378,15 @@ my sub map($mapping, $string, :$nocase = 0) {
pir::assign__vPI($skip, 1);

if pir::defined(%first_chars{$glyph}) {
my $done := 0; # Really needing 'last' here...

for @char_map -> $key {
my $key_length := pir::length__IS($key);

if ! $done
&& equal($key, pir::substr__SSII($string, $index, $key_length),
if equal($key, pir::substr__SSII($string, $index, $key_length),
:nocase($nocase), :length($key_length)) {

pir::assign__vPP($skip, $key_length);
$concat := %char_map{$key};
$done := 1;
break();
}
}
}
Expand Down

0 comments on commit b98b5c2

Please sign in to comment.