From fb0a178dbc209d6a0f49806c7b8dda6f9a3c8707 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Tue, 9 Feb 2021 23:08:44 -0800 Subject: [PATCH] inlined pushPoint(). no-op --- bin/feedgnuplot | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index db25b2e..87aeab2 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -1034,11 +1034,20 @@ sub mainThread my $rangesize = getRangeSize($id); last if @fields < $rangesize; - pushPoint(getCurve($id), - join(' ', - @domain, - splice( @fields, 0, $rangesize ) ) . "\n", - $domain0_numeric); + + # Done. The curve is created. I add a point to the plot. + my $curve = getCurve($id); + + push @{$curve->{datastring_meta}}, + { offset_start => length( $curve->{datastring} ) + + $curve->{datastring_offset}, + domain => $domain0_numeric }; + $curve->{datastring} .= + join(' ', + @domain, + splice( @fields, 0, $rangesize ) ) . "\n"; + $haveNewData = 1; + $i_column += $rangesize; } @@ -1346,18 +1355,6 @@ sub replot } } -# function to add a point to the plot. Assumes that the curve indexed by $idx already exists -sub pushPoint -{ - my ($curve, $datastring, $domain0_numeric) = @_; - - push @{$curve->{datastring_meta}}, { offset_start => length( $curve->{datastring} ) + $curve->{datastring_offset}, - domain => $domain0_numeric }; - $curve->{datastring} .= $datastring; - - $haveNewData = 1; -} - mainThread();