Commit 487229da authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8d794c02
......@@ -401,7 +401,6 @@ overflow:
func (p *AcceptIdentification) NEOEncodedLen() int {
var size int
size += 30
for i := 0; i < len(p.KnownMasterList); i++ {
a := &p.KnownMasterList[i]
......@@ -724,7 +723,6 @@ overflow:
func (p *AnswerPartitionTable) NEOEncodedLen() int {
var size int
size += 12
for i := 0; i < len(p.RowList); i++ {
a := &p.RowList[i]
......@@ -815,7 +813,6 @@ overflow:
func (p *NotifyPartitionTable) NEOEncodedLen() int {
var size int
size += 12
for i := 0; i < len(p.RowList); i++ {
a := &p.RowList[i]
......@@ -2600,7 +2597,6 @@ overflow:
func (p *AnswerPartitionList) NEOEncodedLen() int {
var size int
size += 12
for i := 0; i < len(p.RowList); i++ {
a := &p.RowList[i]
......@@ -2714,7 +2710,6 @@ overflow:
func (p *AnswerNodeList) NEOEncodedLen() int {
var size int
size += 4
for i := 0; i < len(p.NodeList); i++ {
a := &p.NodeList[i]
......@@ -2927,7 +2922,6 @@ overflow:
func (p *NotifyNodeInformation) NEOEncodedLen() int {
var size int
size += 4
for i := 0; i < len(p.NodeList); i++ {
a := &p.NodeList[i]
......
......@@ -442,7 +442,6 @@ func (s *sizer) genSlice(path string, typ *types.Slice, obj types.Object) {
s.varSizeUsed = true
s.n += 4
s.emit("size += %v", s.n)
s.emit("for i := 0; i < len(%v); i++ {", path)
s.emit("a := &%s[i]", path)
//codegenType("(*a)", typ.Elem(), obj, s)
......@@ -509,13 +508,11 @@ func (s *sizer) genMap(path string, typ *types.Map, obj types.Object) {
s.varSizeUsed = true
s.n += 4
s.emit("size += %v", s.n)
s.n = 0
s.emit("for key := range %s {", path)
codegenType("key", typ.Key(), obj, s)
codegenType(fmt.Sprintf("%s[key]", path), typ.Elem(), obj, s)
s.emit("size += %v", s.n)
s.emit("}")
s.n = 0
}
func (e *encoder) genMap(path string, typ *types.Map, obj types.Object) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment