style: modernize to splitseq, cut, min, maps.copy and range-over-int
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user