diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-27 00:46:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-27 00:46:59 +0900 |
| commit | 0db3ba5ff7eac4a9e4f90a9d10edad98151afa40 (patch) | |
| tree | 3d148dd30e4ffa8fc964632725d299125361a631 | |
| parent | c40e74fed85e3f0c5b084ddf3deba79d31e6926b (diff) | |
| download | term-clock-0db3ba5ff7eac4a9e4f90a9d10edad98151afa40.tar.gz term-clock-0db3ba5ff7eac4a9e4f90a9d10edad98151afa40.tar.zst term-clock-0db3ba5ff7eac4a9e4f90a9d10edad98151afa40.zip | |
refactor: use for loop range over int
| -rw-r--r-- | internal/term/draw.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/term/draw.go b/internal/term/draw.go index 2ded6b3..b86b127 100644 --- a/internal/term/draw.go +++ b/internal/term/draw.go @@ -17,9 +17,9 @@ func init() { } func DrawSquare(scr *Screen, xOffset, yOffset, w, h int, style Style) { - for dx := 0; dx < w; dx++ { + for dx := range w { x := xOffset + dx - for dy := 0; dy < h; dy++ { + for dy := range h { y := yOffset + dy scr.scr.SetContent(x, y, ' ', nil, tcell.Style(style)) } |
