internal/ops: rename StateOP to StateOp

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-10-25 11:19:44 +02:00
parent 8cafbd309f
commit 9548dbe901
+4 -4
View File
@@ -71,7 +71,7 @@ type StackID struct {
// StateOp represents a saved operation snapshop to be restored // StateOp represents a saved operation snapshop to be restored
// later. // later.
type StateOP struct { type StateOp struct {
id int id int
macroID int macroID int
ops *Ops ops *Ops
@@ -222,9 +222,9 @@ func (s *stack) pop(sid StackID) {
} }
// Save the effective transformation. // Save the effective transformation.
func Save(o *Ops) StateOP { func Save(o *Ops) StateOp {
o.nextStateID++ o.nextStateID++
s := StateOP{ s := StateOp{
ops: o, ops: o,
id: o.nextStateID, id: o.nextStateID,
macroID: o.macroStack.currentID, macroID: o.macroStack.currentID,
@@ -238,7 +238,7 @@ func Save(o *Ops) StateOP {
// load a previously saved operations state given // load a previously saved operations state given
// its ID. // its ID.
func (s StateOP) Load() { func (s StateOp) Load() {
bo := binary.LittleEndian bo := binary.LittleEndian
data := Write(s.ops, TypeLoadLen) data := Write(s.ops, TypeLoadLen)
data[0] = byte(TypeLoad) data[0] = byte(TypeLoad)