]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PGPeeringEvent: move MLogRec constructor definition to .cc and add unique_ptr
authorSamuel Just <sjust@redhat.com>
Thu, 30 May 2019 00:31:40 +0000 (17:31 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 30 May 2019 17:53:42 +0000 (10:53 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PGPeeringEvent.cc
src/osd/PGPeeringEvent.h

index 52aff7dc209eac88bb521d4c952ec63538decbc1..79c21b826b959ff3d434ddb5c5ba093cdaa4db06 100644 (file)
@@ -6,3 +6,6 @@
 #include "messages/MOSDPGLog.h"
 
 MEMPOOL_DEFINE_OBJECT_FACTORY(PGPeeringEvent, pg_peering_evt, osd);
+
+MLogRec::MLogRec(pg_shard_t from, MOSDPGLog *msg) :
+  from(from), msg(msg) {}
index 21cc0b1a4647e320914d6f67865213d5c25b097d..de32e97822a690ce147bdd2b6a1e51f000fcc709 100644 (file)
@@ -67,6 +67,7 @@ public:
   }
 };
 typedef std::shared_ptr<PGPeeringEvent> PGPeeringEventRef;
+typedef std::unique_ptr<PGPeeringEvent> PGPeeringEventURef;
 
 struct MInfoRec : boost::statechart::event< MInfoRec > {
   pg_shard_t from;
@@ -82,8 +83,7 @@ struct MInfoRec : boost::statechart::event< MInfoRec > {
 struct MLogRec : boost::statechart::event< MLogRec > {
   pg_shard_t from;
   boost::intrusive_ptr<MOSDPGLog> msg;
-  MLogRec(pg_shard_t from, MOSDPGLog *msg) :
-    from(from), msg(msg) {}
+  MLogRec(pg_shard_t from, MOSDPGLog *msg);
   void print(std::ostream *out) const {
     *out << "MLogRec from " << from;
   }