mirror of https://github.com/oxen-io/lokinet
fix
This commit is contained in:
parent
018dd008ec
commit
11b9aea4a7
|
@ -29,7 +29,8 @@ namespace llarp
|
|||
NewPtr()
|
||||
{
|
||||
void *ptr = mem->allocate();
|
||||
return new(ptr) Value_t();
|
||||
new(ptr) Value_t;
|
||||
return static_cast<Ptr_t>(ptr);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -94,9 +95,7 @@ namespace llarp
|
|||
}
|
||||
}
|
||||
_allocated.set(_pos);
|
||||
Value_t *ptr = (Value_t *)&_buffer[_pos * sizeof(Value_t)];
|
||||
_pos = (_pos + 1) % maxEntries;
|
||||
return ptr;
|
||||
return (Value_t *)&_buffer[_pos * sizeof(Value_t)];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue