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