lichao
2021-04-25 58e3540930d290b315fd24d0414c8feeb7bc8bc1
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()
   {