mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06:45 +08:00
adjust elem_t construction
This commit is contained in:
parent
85bb05bb52
commit
caabc24b71
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@ -47,8 +46,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
struct elem_t {
|
struct elem_t {
|
||||||
head_t head_;
|
head_t head_;
|
||||||
byte_t data_[data_size];
|
byte_t data_[data_size] {};
|
||||||
elem_t(void) { ::memset(data_, 0, sizeof(data_)); }
|
|
||||||
};
|
};
|
||||||
elem_t block_[elem_max];
|
elem_t block_[elem_max];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user