diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-02-16 16:23:52 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-02-16 16:24:28 -0500 |
commit | f485e25f82b9d96e0cf7173615eaa85cd93cbe5e (patch) | |
tree | d70c5fc472e4dc7bad0edcdc21c30f30f5375c28 /db/index.cpp | |
parent | d1e3572f45318511402b8482e7c63d3446d52ec8 (diff) | |
download | mongo-f485e25f82b9d96e0cf7173615eaa85cd93cbe5e.tar.gz |
clean plugin stuff
Diffstat (limited to 'db/index.cpp')
-rw-r--r-- | db/index.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/db/index.cpp b/db/index.cpp index 6ad3f43cebf..ddd97bb91ac 100644 --- a/db/index.cpp +++ b/db/index.cpp @@ -98,7 +98,6 @@ namespace mongo { } void IndexSpec::_init(){ - _indexType = 0; assert( keyPattern.objsize() ); string pluginName = ""; @@ -130,14 +129,14 @@ namespace mongo { log() << "warning: can't find plugin [" << pluginName << "]" << endl; } else { - assert(0); + _indexType.reset( plugin->generate( this ) ); } } } void IndexSpec::getKeys( const BSONObj &obj, BSONObjSetDefaultOrder &keys ) const { - if ( _indexType ){ + if ( _indexType.get() ){ _indexType->getKeys( obj , keys ); return; } |