| 54 | } |
| 55 | |
| 56 | ObjectPtr retrieve( const ObjectPool &pool, MurmurHash key, bool _copy ) |
| 57 | { |
| 58 | ConstObjectPtr o = pool.retrieve(key); |
| 59 | |
| 60 | if ( !o ) |
| 61 | { |
| 62 | return nullptr; |
| 63 | } |
| 64 | |
| 65 | if ( _copy ) |
| 66 | { |
| 67 | return o->copy(); |
| 68 | } |
| 69 | |
| 70 | return const_cast< Object * >(o.get()); |
| 71 | } |
| 72 | |
| 73 | void bindObjectPool() |
| 74 | { |