Skip to content

Commit dd0d824

Browse files
committed
Mark ptr and dataStartIndex properties of ByteReader as final
This should slightly improve performance in certain cases.
1 parent aaa9d75 commit dd0d824

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/ByteReader.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public class ByteReader {
2525
}
2626

2727
var _offset: Int
28-
let ptr: UnsafeBufferPointer<UInt8>
29-
private let dataStartIndex: Int // For efficient (without access to `data`) implementation of `offset`.
28+
final let ptr: UnsafeBufferPointer<UInt8>
29+
private final let dataStartIndex: Int // For efficient (without access to `data`) implementation of `offset`.
3030

3131
/**
3232
True, if `offset` points at any position after the last byte in `data`.

0 commit comments

Comments
 (0)