mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
internal/ops: rename StateOP to StateOp
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-4
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user