Mercurial > hg > batmud > misc
changeset 274:7f4d966da5d9 misc
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 08 Mar 2015 09:02:19 +0200 |
parents | 2deed72277a5 |
children | 6c9bcf5ffc72 |
files | materials/parsealloys.pl |
diffstat | 1 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/materials/parsealloys.pl Sun Mar 08 09:02:07 2015 +0200 +++ b/materials/parsealloys.pl Sun Mar 08 09:02:19 2015 +0200 @@ -80,10 +80,12 @@ { # Get both (a, b) and (b, a) combinations results into same array my @tmp = (); - if (defined($data{$min1}{$min2})) { + if (defined($data{$min1}{$min2})) + { push(@tmp, @{$data{$min1}{$min2}}); } - if (defined($data{$min2}{$min1})) { + if (defined($data{$min2}{$min1})) + { push(@tmp, @{$data{$min2}{$min1}}); } @@ -95,19 +97,14 @@ { $final{$min1}{$min2} = $final{$min2}{$min1} = \%seen; } + elsif ($min1 lt $min2) + { + $final{$min1}{$min2} = \%seen; + } else { -# print STDERR "$min1 : $min2 == "; foreach my $a (keys %seen) { print STDERR "$a=$seen{$a}, "; } print STDERR "\n"; - if ($min1 lt $min2) - { - $final{$min1}{$min2} = \%seen; - } - else - { - $final{$min2}{$min1} = \%seen; - } + $final{$min2}{$min1} = \%seen; } - # domark } } }