mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 01:41:30 +00:00
more
This commit is contained in:
@ -25,8 +25,7 @@ export function bswap<T>(value: T): T {
|
||||
return value;
|
||||
}
|
||||
|
||||
@inline
|
||||
export function bswap16<T>(value: T): T {
|
||||
@inline export function bswap16<T>(value: T): T {
|
||||
if (isInteger<T>() && sizeof<T>() <= 4) {
|
||||
if (sizeof<T>() == 2) {
|
||||
return <T>((value << 8) | ((value >> 8) & <T>0x00FF));
|
||||
|
Reference in New Issue
Block a user