Kaydet (Commit) 14e6a83c authored tarafından Tim Retout's avatar Tim Retout Kaydeden (comit) Michael Meeks

Remove unnecessary sorting subroutines.

üst 177a9666
......@@ -90,30 +90,4 @@ sub sort_array_of_hashes_numerically
}
}
#########################################
# Sorting an array of of strings
#########################################
sub sorting_array_of_strings
{
my ($arrayref) = @_;
for ( my $i = 0; $i <= $#{$arrayref}; $i++ )
{
my $onestringunder = ${$arrayref}[$i];
for ( my $j = $i + 1; $j <= $#{$arrayref}; $j++ )
{
my $onestringover = ${$arrayref}[$j];
if ( $onestringunder gt $onestringover)
{
${$arrayref}[$i] = $onestringover;
${$arrayref}[$j] = $onestringunder;
$onestringunder = $onestringover;
}
}
}
}
1;
......@@ -42,7 +42,6 @@ use installer::logger;
use installer::pathanalyzer;
use installer::scpzipfiles;
use installer::scriptitems;
use installer::sorter;
use installer::systemactions;
use installer::windows::language;
......@@ -1532,23 +1531,6 @@ sub shift_file_to_end
return \@patchfile;
}
###########################################################
# Putting hash content into array and sorting it
###########################################################
sub sort_hash
{
my ( $hashref ) = @_;
my $item = "";
my @sortedarray = ();
foreach $item (keys %{$hashref}) { push(@sortedarray, $item); }
installer::sorter::sorting_array_of_strings(\@sortedarray);
return \@sortedarray;
}
###########################################################
# Renaming Windows files in Patch and creating file
# patchfiles.txt
......@@ -1611,7 +1593,7 @@ sub prepare_windows_patchfiles
my $patchlistfile = installer::existence::get_specified_file_by_name($filesref, $patchfilename);
# reorganizing the patchfile content, sorting for directory to decrease the file size
my $sorteddirectorylist = sort_hash(\%patchfiledirectories);
my $sorteddirectorylist = [ sort keys %patchfiledirectories ];
my $patchfilelist = reorg_patchfile(\@patchfiles, $sorteddirectorylist);
# shifting version.ini to the end of the list, to guarantee, that all files are patched
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment