mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
virtio: remove bitfield in Index template
Eliminates note of GCC about bitfield as parameter semantic change. Ref #4344
This commit is contained in:
parent
609af0037f
commit
6dbdb966fc
@ -48,13 +48,17 @@ class Vmm::Virtio_split_queue
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned _idx : LOG2;
|
||||
uint16_t _idx;
|
||||
|
||||
static_assert((sizeof(uint16_t)*8) >= LOG2);
|
||||
|
||||
public:
|
||||
|
||||
Index(unsigned idx = 0) : _idx(idx % (1 << LOG2)) {}
|
||||
|
||||
void inc() { _idx++; }
|
||||
void inc() {
|
||||
_idx = ((_idx + 1) % (1 << LOG2)); }
|
||||
|
||||
unsigned idx() const { return _idx; }
|
||||
|
||||
bool operator != (Index const & o) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user