[Orca-checkins] r305 - trunk/orca/lib/Orca

Blair Zajac blair at orcaware.com
Sun Apr 18 18:33:34 PDT 2004


Author: blair
Date: Sun Apr 18 18:33:17 2004
New Revision: 305

Modified:
   trunk/orca/lib/Orca/SourceFile.pm
Log:
* lib/Orca/SourceFile.pm (add_plots):
  Minor optimization.  Use a previously calculated array length.


Modified: trunk/orca/lib/Orca/SourceFile.pm
==============================================================================
--- trunk/orca/lib/Orca/SourceFile.pm	(original)
+++ trunk/orca/lib/Orca/SourceFile.pm	Sun Apr 18 18:33:17 2004
@@ -349,7 +349,7 @@
     my $number_datas         = @{$plot->{data}};
     my $number_elements      = @{$plot->{data}[0]};
     my $regexp_element_index = -1;
-    for (my $j=0; $j<@{$plot->{data}[0]}; ++$j) {
+    for (my $j=0; $j<$number_elements; ++$j) {
       if ($plot->{data}[0][$j] =~ m:\(.+\):) {
         $regexp_element_index = $j;
         last;



More information about the Orca-checkins mailing list