lichao
2021-04-23 628c1c21ffb19d8c96ed9ce89531595f9870ab1a
src/msg.h
@@ -70,9 +70,11 @@
      return pshm;
   }
   struct Meta {
   static const uint32_t kMsgTag = 0xf1e2d3c4;
   typedef struct {
      RefCount count_;
   };
      const uint32_t tag_ = kMsgTag;
   } Meta;
   Offset offset_;
   void *Alloc(const size_t size)
   {
@@ -155,9 +157,8 @@
   explicit ShmMsg(const size_t size) :
       ShmMsg(Alloc(size)) {}
   void swap(ShmMsg &a) { std::swap(offset_, a.offset_); }
   bool valid() const { return static_cast<bool>(offset_); }
   bool valid() const { return static_cast<bool>(offset_) && meta()->tag_ == kMsgTag; }
   // AddRef and Release works for both counted and not counted msg.
   int AddRef() const { return valid() ? meta()->count_.Inc() : 1; }
   int Release()
   {