File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -66,17 +66,12 @@ proc newStructBool*(b: bool): StructNode =
66
66
result .kind = StructBool
67
67
result .bval = b
68
68
69
- proc newStructInt* [T: uint | int | int16 | uint16 | int32 | uint32 | int64 | uint64 | BiggestInt](i: T): StructNode =
70
- result .kind = StructInt
71
- result .num = i.BiggestInt
69
+ proc newStructInt* [T: uint | int | int16 | uint16 | int32 | uint32 | int64 | uint64 | BiggestInt](i: T): StructNode =
70
+ result = StructNode(kind: StructInt, num: i.BiggestInt)
72
71
73
- proc newStructFloat*(d: BiggestFloat): StructNode =
74
- result .kind = StructFloat
75
- result .fval = d
72
+ proc newStructFloat*(d: BiggestFloat): StructNode = StructNode(kind: StructFloat, fval: d)
76
73
77
- proc newStructString*(s: string ): StructNode =
78
- result .kind = StructString
79
- result .str = s
74
+ proc newStructString*(s: string ): StructNode = StructNode(kind: StructString, str: s)
80
75
81
76
proc newStructContext(): StructContext =
82
77
result .byteOrder = system.cpuEndian
You can’t perform that action at this time.
0 commit comments