From: Samuel Just Date: Wed, 15 Aug 2012 21:40:17 +0000 (-0700) Subject: PG,Message: move intrusive_ptr_* into top namespace X-Git-Tag: v0.51~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e7df78e672d117b9cc636ec4c1aa2cf2f98a1da;p=ceph.git PG,Message: move intrusive_ptr_* into top namespace gcc 4.7 requires that the intrusive_ptr_* functions be in the same namespace as the templated class. Signed-off-by: Samuel Just --- diff --git a/src/msg/Message.cc b/src/msg/Message.cc index da72e9db4544..7046dd257b2f 100644 --- a/src/msg/Message.cc +++ b/src/msg/Message.cc @@ -147,17 +147,15 @@ using namespace std; #define dout_subsys ceph_subsys_ms -namespace boost { - void intrusive_ptr_add_ref(Message *p) - { - p->get(); - } +void intrusive_ptr_add_ref(Message *p) +{ + p->get(); +} - void intrusive_ptr_release(Message *p) - { - p->put(); - } -}; +void intrusive_ptr_release(Message *p) +{ + p->put(); +} void Message::encode(uint64_t features, bool datacrc) { diff --git a/src/msg/Message.h b/src/msg/Message.h index 9039a8b44ba8..fba50ded0277 100644 --- a/src/msg/Message.h +++ b/src/msg/Message.h @@ -454,10 +454,8 @@ inline ostream& operator<<(ostream& out, Message& m) { extern void encode_message(Message *m, uint64_t features, bufferlist& bl); extern Message *decode_message(CephContext *cct, bufferlist::iterator& bl); -namespace boost { - void intrusive_ptr_add_ref(Message *p); - void intrusive_ptr_release(Message *p); -}; +void intrusive_ptr_add_ref(Message *p); +void intrusive_ptr_release(Message *p); #endif diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 934da8cfb4dc..90018f45c0f8 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5714,5 +5714,5 @@ bool PG::PriorSet::affected_by_map(const OSDMapRef osdmap, const PG *debug_pg) c return false; } -void boost::intrusive_ptr_add_ref(PG *pg) { pg->get(); } -void boost::intrusive_ptr_release(PG *pg) { pg->put(); } +void intrusive_ptr_add_ref(PG *pg) { pg->get(); } +void intrusive_ptr_release(PG *pg) { pg->put(); } diff --git a/src/osd/PG.h b/src/osd/PG.h index 53358215de7c..09ba12ea41b4 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1564,9 +1564,7 @@ WRITE_CLASS_ENCODER(PG::OndiskLog) ostream& operator<<(ostream& out, const PG& pg); -namespace boost { - void intrusive_ptr_add_ref(PG *pg); - void intrusive_ptr_release(PG *pg); -}; +void intrusive_ptr_add_ref(PG *pg); +void intrusive_ptr_release(PG *pg); #endif