Skip to content

Commit

Permalink
datareader: Removing bswap for u8
Browse files Browse the repository at this point in the history
  • Loading branch information
pkedy committed Sep 21, 2022
1 parent c3c6ce5 commit 87351d2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1,437 deletions.
6 changes: 3 additions & 3 deletions assembly/datareader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class DataReader {
peekUint8(): u8 {
const err = this.checkBufferSize(1);
if (err) return 0;
return bswap(load<u8>(this.dataStart + this.byteOffset));
return load<u8>(this.dataStart + this.byteOffset);
}

discard(length: i32): void {
Expand Down Expand Up @@ -105,7 +105,7 @@ export class DataReader {
if (err) return 0;
const result = load<u8>(this.dataStart + this.byteOffset);
this.byteOffset++;
return bswap(result);
return result;
}

getUint16(): u16 {
Expand Down Expand Up @@ -168,7 +168,7 @@ export class DataReader {
setUint8(value: u8): void {
const err = this.checkBufferSize(1);
if (err) return;
store<u8>(this.dataStart + this.byteOffset, bswap(value));
store<u8>(this.dataStart + this.byteOffset, value);
this.byteOffset++;
}

Expand Down
Loading

0 comments on commit 87351d2

Please sign in to comment.