summaryrefslogtreecommitdiff
path: root/db/index.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-02-16 16:23:52 -0500
committerEliot Horowitz <eliot@10gen.com>2010-02-16 16:24:28 -0500
commitf485e25f82b9d96e0cf7173615eaa85cd93cbe5e (patch)
treed70c5fc472e4dc7bad0edcdc21c30f30f5375c28 /db/index.cpp
parentd1e3572f45318511402b8482e7c63d3446d52ec8 (diff)
downloadmongo-f485e25f82b9d96e0cf7173615eaa85cd93cbe5e.tar.gz
clean plugin stuff
Diffstat (limited to 'db/index.cpp')
-rw-r--r--db/index.cpp5
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;
}