Skip to content

Commit

Permalink
Remove redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
ropery committed Sep 7, 2014
1 parent f794627 commit 26a27ad
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/ffcast.bash
Expand Up @@ -419,10 +419,8 @@ while getopts ':#:bfg:hiqsvwx:' opt; do
IFS=' ,' read -a ids <<< "$OPTARG"
fi
for id in "${ids[@]}"; do
if [[ $id != +([0-9]) ]]; then
warn "ignored invalid head ID: \'%s'" "$id"
elif [[ ! -v heads_all[$id] ]]; then
warn "ignored non-existent head ID: \`%s'" "$id"
if [[ ! -v heads_all[$id] ]]; then
warn "ignored invalid head ID: \`%s'" "$id"
else
heads[$id]=${heads_all[$id]}
rects[i++]="heads[$id]"
Expand Down Expand Up @@ -492,12 +490,12 @@ unset -v mom

set_region_vars_by_offsets || exit

#---
# Import predefined sub-commands

# a little optimization
(($#)) || { run_default_command; exit; }

#---
# Import predefined sub-commands

for srcdir in "${srcdirs[@]}"; do
subcmdsrc=$srcdir/subcmd
if [[ -r $subcmdsrc ]]; then
Expand Down

0 comments on commit 26a27ad

Please sign in to comment.