style: modernize to splitseq, cut, min, maps.copy and range-over-int

This commit is contained in:
2026-08-29 16:04:32 +02:00
parent eacf33d0f7
commit 9beff4ae85
40 changed files with 90 additions and 234 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ var wpSlots [4]bool
// FindFreeWatchpointSlot returns the index of the first free watchpoint slot
// (0-3), or -1 if all four hardware watchpoints are in use.
func (s *Session) FindFreeWatchpointSlot() int {
for i := 0; i < 4; i++ {
for i := range 4 {
if !wpSlots[i] {
return i
}
@@ -122,7 +122,7 @@ func (s *Session) ClearWatchpoint(slot int) error {
// ClearAllWatchpoints removes all hardware watchpoints.
func (s *Session) ClearAllWatchpoints() error {
for slot := 0; slot < 4; slot++ {
for slot := range 4 {
if wpSlots[slot] {
if err := s.ClearWatchpoint(slot); err != nil {
return err