Merge pull request #603 from dylanaraps/math2

General: Swap some math to simpler syntax
This commit is contained in:
Dylan Araps 2017-01-08 07:52:34 +11:00 committed by GitHub
commit e5153e054b
1 changed files with 4 additions and 4 deletions

View File

@ -1041,7 +1041,7 @@ get_gpu() {
fi fi
prin "${subtitle}${gpu_num}" "$gpu" prin "${subtitle}${gpu_num}" "$gpu"
gpu_num="$((gpu_num+=1))" ((++gpu_num))
done done
return return
@ -1952,7 +1952,7 @@ get_ascii() {
line="${line//\$\{??\}}" line="${line//\$\{??\}}"
line="${line//\\\\/\\}" line="${line//\\\\/\\}"
((${#line} > ascii_length)) && ascii_length="${#line}" ((${#line} > ascii_length)) && ascii_length="${#line}"
lines="$((lines+=1))" ((++lines))
done < "$ascii" done < "$ascii"
# Colors. # Colors.
@ -2437,7 +2437,7 @@ prin() {
printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} " printf "%b\n" "${text_padding:+\033[${text_padding}C}${zws}${string}${reset} "
# Calculate info height. # Calculate info height.
info_height="$((info_height+=1))" ((++info_height))
# Log that prin was used. # Log that prin was used.
prin=1 prin=1
@ -2456,7 +2456,7 @@ get_line_break() {
printf "%s\n" "${zws} " printf "%s\n" "${zws} "
# Calculate info height. # Calculate info height.
info_height="$((info_height+=1))" ((++info_height))
# Tell info() that we printed manually. # Tell info() that we printed manually.
prin=1 prin=1