Skip to content

[Implement] Buffer.readInt8#9

Merged
jtenner merged 8 commits intoAssemblyScript:masterfrom
RedDwarfian:add-testing
Jul 21, 2019
Merged

[Implement] Buffer.readInt8#9
jtenner merged 8 commits intoAssemblyScript:masterfrom
RedDwarfian:add-testing

Conversation

@RedDwarfian
Copy link
Copy Markdown
Contributor

Kudos to @jtenner for assistance with this.

@jtenner
Copy link
Copy Markdown
Contributor

jtenner commented Jul 20, 2019

@dcodeIO this looks good to me. Did we miss anything?

}

readInt8(offset: i32) : i8 {
if(u32(offset) >= this.dataLength) throw new RangeError(E_INDEXOUTOFRANGE);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In stdlib, which is also non-portable, this is usually written as <u32>offset. Might make sense to adopt the stdlib notation in the node library as well for consistency.

@dcodeIO
Copy link
Copy Markdown
Member

dcodeIO commented Jul 20, 2019

Looking good, just a minor nit :)

@jtenner jtenner added the enhancement New feature or request label Jul 21, 2019
@jtenner jtenner merged commit 364fe63 into AssemblyScript:master Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants