소스 검색

Dpkg::Shlibs::SymbolFile: Use map instead of foreach to initialize the hash

Guillem Jover 11 년 전
부모
커밋
8e8c7b7fde
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      scripts/Dpkg/Shlibs/SymbolFile.pm

+ 2 - 2
scripts/Dpkg/Shlibs/SymbolFile.pm

@@ -112,8 +112,8 @@ sub clear {
 
 sub clear_except {
     my ($self, @ids) = @_;
-    my %has;
-    $has{$_} = 1 foreach (@ids);
+
+    my %has = map { $_ => 1 } @ids;
     foreach my $objid (keys %{$self->{objects}}) {
 	delete $self->{objects}{$objid} unless exists $has{$objid};
     }