minor simplification

I delete the with option after I use it. This is defensive and clarifies the
intent
This commit is contained in:
Dima Kogan 2016-10-15 20:17:08 -07:00
parent 5123ca73d3
commit 167e85d2a7

View File

@ -146,6 +146,17 @@ sub interpretCommandline
push @{$options{curvestyle}}, @{$options{style}};
delete $options{style};
if( $options{curvestyleall} && $options{with} )
{
print STDERR "--curvestyleall and --with are mutually exclusive. Please just use one.\n";
exit -1;
}
if( $options{with} )
{
$options{curvestyleall} = "with $options{with}";
delete $options{with};
}
# --legend and --curvestyle options are conceptually hashes, but are parsed as
# arrays in order to preserve the ordering. I parse both of these into hashes
# because those are useful to have later. After this I can access individual
@ -227,17 +238,6 @@ sub interpretCommandline
}
}
if( $options{curvestyleall} && $options{with} )
{
print STDERR "--curvestyleall and --with are mutually exclusive. Please just use one.\n";
exit -1;
}
if( $options{with} )
{
$options{curvestyleall} = "with $options{with}";
$options{with} = '';
}
if ($options{colormap})
{
# colormap styles all curves with palette. Seems like there should be a way to do this with a