Skip to content

Separate bit twiddling from buffer accesses in sets #489

Closed
@jnj

Description

@jnj

This is a wish list item. It would be nice in the generated output to separate the buffer accesses from the bit manipulation in bit sets because we may not always have a buffer to work with. For example:

// This decoder requires a buffer containing our byte.
public boolean lastVolumeMsg()
{
        return 0 != (buffer.getByte(offset) & (1 << 1));
}

I'd like to have, say, a static method that doesn't require a buffer:

// No buffer needed.
public static boolean lastVolumeMsg(byte b)
{
        return 0 != (b & (1 << 1));
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions