Improved code quality

This commit is contained in:
2025-02-20 16:55:17 +01:00
parent 9779476fe7
commit 36d0142573
12 changed files with 51 additions and 37 deletions

View File

@ -1,8 +1,6 @@
package asm
import (
"fmt"
)
import "strconv"
// MemoryNumber operates with a memory address and a number.
type MemoryNumber struct {
@ -12,7 +10,7 @@ type MemoryNumber struct {
// String returns a human readable version.
func (data *MemoryNumber) String() string {
return data.Address.Format(fmt.Sprint(data.Number))
return data.Address.Format(strconv.Itoa(data.Number))
}
// MemoryNumber adds an instruction with a memory address and a number.