]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG.cc: PG constructor pass PGPool by reference
authorSamuel Just <sam.just@inktank.com>
Wed, 29 Aug 2012 23:28:20 +0000 (16:28 -0700)
committerSage Weil <sage@inktank.com>
Fri, 31 Aug 2012 20:11:36 +0000 (13:11 -0700)
CID 717053: Big parameter passed by value (PASS_BY_VALUE)At (1): Passing
parameter _pool of type PGPool (size 336 bytes) by value.

Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/PG.h

index 849dca4c38874c1fd40666aae071feb555fcf4f5..34e9d36ac6eef2a0cf5553820532da251f5ba468 100644 (file)
@@ -57,7 +57,8 @@ void PGPool::update(OSDMapRef map)
 }
 
 PG::PG(OSDService *o, OSDMapRef curmap,
-       PGPool _pool, pg_t p, const hobject_t& loid, const hobject_t& ioid) :
+       const PGPool &_pool, pg_t p, const hobject_t& loid,
+       const hobject_t& ioid) :
   osd(o), osdmap_ref(curmap), pool(_pool),
   _lock("PG::_lock"),
   ref(0), deleting(false), dirty_info(false), dirty_log(false),
index 2be781f47698704baf8d157561c5524dd821c40f..3acf4e73ca92e44e681cd6fc5bdec6aed5540991 100644 (file)
@@ -1395,7 +1395,7 @@ public:
 
  public:
   PG(OSDService *o, OSDMapRef curmap,
-     PGPool pool, pg_t p, const hobject_t& loid, const hobject_t& ioid);
+     const PGPool &pool, pg_t p, const hobject_t& loid, const hobject_t& ioid);
   virtual ~PG();
 
  private: