mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
optimized code
This commit is contained in:
parent
6be8071802
commit
1f50cd6ac3
@ -53,10 +53,7 @@ private:
|
||||
|
||||
public:
|
||||
static std::uint16_t next(std::uint16_t i) {
|
||||
if (id(++i) == elem_max) {
|
||||
return ++i;
|
||||
}
|
||||
else return i;
|
||||
return (id(++i) == elem_max) ? 0 : i;
|
||||
}
|
||||
|
||||
circ_queue(void) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user