diff --git a/lib/layout/core/types/leb128.dart b/lib/layout/core/types/leb128.dart index 3cd2621..12fba4e 100644 --- a/lib/layout/core/types/leb128.dart +++ b/lib/layout/core/types/leb128.dart @@ -5,12 +5,12 @@ import 'package:blockchain_utils/layout/core/core.dart'; /// /// LEB128 is a variable-length encoding method that is efficient for representing small numbers compactly. /// This layout is used in serialization frameworks like BCS (Binary Canonical Serialization). -class LEB128DIntLayout extends Layout { +class LEB128IntLayout extends Layout { /// Constructor for [LEB128IntLayout]. /// /// [layout] is the underlying integer layout used for validation. /// [property] is an optional key associated with this layout for structured data handling. - LEB128DIntLayout(this.layout, {String? property}) + LEB128IntLayout(this.layout, {String? property}) : super(-1, property: property); /// The integer layout used to validate values before encoding. @@ -97,7 +97,7 @@ class LEB128DIntLayout extends Layout { /// /// Useful when reusing the layout structure with different property associations. @override - LEB128DIntLayout clone({String? newProperty}) { - return LEB128DIntLayout(layout, property: newProperty); + LEB128IntLayout clone({String? newProperty}) { + return LEB128IntLayout(layout, property: newProperty); } } diff --git a/lib/layout/core/types/leb128_offset.dart b/lib/layout/core/types/leb128_offset.dart index 80bea92..d14c8b0 100644 --- a/lib/layout/core/types/leb128_offset.dart +++ b/lib/layout/core/types/leb128_offset.dart @@ -14,7 +14,7 @@ class LEB128U32OffsetLayout extends ExternalOffsetLayout { LEB128U32OffsetLayout({super.property}); /// Internal layout used for encoding and decoding LEB128 integers. - final LEB128DIntLayout layout = LEB128DIntLayout(LayoutConst.u32()); + final LEB128IntLayout layout = LEB128IntLayout(LayoutConst.u32()); /// Indicates that this layout represents a count (such as the length of a vector). @override @@ -43,7 +43,7 @@ class LEB128U32OffsetLayout extends ExternalOffsetLayout { /// Returns the number of bytes written after encoding. @override int encode(int source, LayoutByteWriter writer, {int offset = 0}) { - final encodeLength = LEB128DIntLayout.writeVarint(source); + final encodeLength = LEB128IntLayout.writeVarint(source); writer.setAll(offset, encodeLength); return encodeLength.length; }