File tree Expand file tree Collapse file tree 1 file changed +21
-20
lines changed
Expand file tree Collapse file tree 1 file changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -259,31 +259,32 @@ class BinaryParser
259259 {% end % }
260260 end
261261 end
262- end
263262
264- module ByteSize
265- macro included
266- @static_size : Int32 ?
263+ module ByteSize
264+ macro included
265+ @static_size : Int32 ?
267266
268- def bytesize
269- dyn_size = 0
270- {% for func in @type .methods % }
271- {% if func.name.starts_with? " _size_dyn" % }
272- dyn_size += {{func.name}}
267+ def bytesize
268+ dyn_size = 0
269+ {% for func in @type .methods % }
270+ {% if func.name.starts_with? " _size_dyn" % }
271+ dyn_size += {{func.name}}
272+ {% end % }
273273 {% end % }
274- {% end % }
275- static_size + dyn_size
276- end
274+ static_size + dyn_size
275+ end
277276
278- private def static_size
279- return @static_size .not_nil! if @static_size
280- size = 0
281- {% for func in @type .methods % }
282- {% if func.name.starts_with? " _size_static" % }
283- size += {{func.name}}
277+ private def static_size
278+ return @static_size .not_nil! if @static_size
279+ size = 0
280+ {% for func in @type .methods % }
281+ {% if func.name.starts_with? " _size_static" % }
282+ size += {{func.name}}
283+ {% end % }
284284 {% end % }
285- { % end % }
286- @static_size = size
285+ @static_size = size
286+ end
287287 end
288288 end
289289end
290+
You can’t perform that action at this time.
0 commit comments