diff options
4 files changed, 17 insertions, 14 deletions
diff --git a/src/mongo/db/index/external_key_generator.cpp b/src/mongo/db/index/external_key_generator.cpp index 9f93bd6f439..cf2ba7d9a4b 100644 --- a/src/mongo/db/index/external_key_generator.cpp +++ b/src/mongo/db/index/external_key_generator.cpp @@ -29,6 +29,7 @@ #include "mongo/db/index/external_key_generator.h" #include <cmath> +#include <string> #include "mongo/db/fts/fts_spec.h" #include "mongo/db/index/s2_common.h" @@ -45,15 +46,15 @@ namespace { void getKeysForUpgradeChecking(const BSONObj& infoObj, const BSONObj& doc, BSONObjSet* keys) { BSONObj keyPattern = infoObj.getObjectField("key"); - string type = IndexNames::findPluginName(keyPattern); + std::string type = IndexNames::findPluginName(keyPattern); if (IndexNames::GEO_2D == type) { TwoDIndexingParams params; ExpressionParams::parseTwoDParams(infoObj, ¶ms); ExpressionKeysPrivate::get2DKeys(doc, params, keys, NULL); } else if (IndexNames::GEO_HAYSTACK == type) { - string geoField; - vector<string> otherFields; + std::string geoField; + std::vector<std::string> otherFields; double bucketSize; ExpressionParams::parseHaystackParams(infoObj, &geoField, &otherFields, &bucketSize); ExpressionKeysPrivate::getHaystackKeys(doc, geoField, otherFields, bucketSize, keys); @@ -67,7 +68,7 @@ void getKeysForUpgradeChecking(const BSONObj& infoObj, const BSONObj& doc, BSONO } else if (IndexNames::HASHED == type) { HashSeed seed; int version; - string field; + std::string field; ExpressionParams::parseHashParams(infoObj, &seed, &version, &field); ExpressionKeysPrivate::getHashKeys( doc, field, seed, version, infoObj["sparse"].trueValue(), keys); diff --git a/src/mongo/db/index_legacy.cpp b/src/mongo/db/index_legacy.cpp index ca6a97ce3e9..e9d19cc511d 100644 --- a/src/mongo/db/index_legacy.cpp +++ b/src/mongo/db/index_legacy.cpp @@ -28,6 +28,8 @@ #include "mongo/db/index_legacy.h" +#include <string> + #include "mongo/db/client.h" #include "mongo/db/fts/fts_spec.h" #include "mongo/db/index/expression_keys_private.h" @@ -39,7 +41,7 @@ namespace mongo { // static BSONObj IndexLegacy::adjustIndexSpecObject(const BSONObj& obj) { - string pluginName = IndexNames::findPluginName(obj.getObjectField("key")); + std::string pluginName = IndexNames::findPluginName(obj.getObjectField("key")); if (IndexNames::TEXT == pluginName) { return fts::FTSSpec::fixSpec(obj); @@ -57,7 +59,7 @@ BSONObj IndexLegacy::getMissingField(OperationContext* txn, Collection* collection, const BSONObj& infoObj) { BSONObj keyPattern = infoObj.getObjectField("key"); - string accessMethodName; + std::string accessMethodName; if (collection) accessMethodName = collection->getIndexCatalog()->getAccessMethodName(txn, keyPattern); else diff --git a/src/mongo/db/storage/kv/kv_database_catalog_entry_get_index.cpp b/src/mongo/db/storage/kv/kv_database_catalog_entry_get_index.cpp index 4df30c2b98a..95a270c3e99 100644 --- a/src/mongo/db/storage/kv/kv_database_catalog_entry_get_index.cpp +++ b/src/mongo/db/storage/kv/kv_database_catalog_entry_get_index.cpp @@ -54,9 +54,9 @@ IndexAccessMethod* KVDatabaseCatalogEntry::getIndex(OperationContext* txn, IndexCatalogEntry* index) { IndexDescriptor* desc = index->descriptor(); - const string& type = desc->getAccessMethodName(); + const std::string& type = desc->getAccessMethodName(); - string ident = + std::string ident = _engine->getCatalog()->getIndexIdent(txn, collection->ns().ns(), desc->indexName()); SortedDataInterface* sdi = _engine->getEngine()->getSortedDataInterface(txn, ident, desc); diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp index 8cdbd4ad7a4..f39be575b02 100644 --- a/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp +++ b/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp @@ -192,7 +192,7 @@ MMAPV1DatabaseCatalogEntry::~MMAPV1DatabaseCatalogEntry() { _collections.clear(); } -intmax_t dbSize(const string& database); // from repair_database.cpp +intmax_t dbSize(const std::string& database); // from repair_database.cpp int64_t MMAPV1DatabaseCatalogEntry::sizeOnDisk(OperationContext* opCtx) const { return static_cast<int64_t>(dbSize(name())); @@ -279,7 +279,7 @@ Status MMAPV1DatabaseCatalogEntry::renameCollection(OperationContext* txn, if (!newIndexSpecLoc.isOK()) return newIndexSpecLoc.getStatus(); - const string& indexName = oldIndexSpec.getStringField("name"); + const std::string& indexName = oldIndexSpec.getStringField("name"); { // fix IndexDetails pointer @@ -294,8 +294,8 @@ Status MMAPV1DatabaseCatalogEntry::renameCollection(OperationContext* txn, { // move underlying namespac - string oldIndexNs = IndexDescriptor::makeIndexNamespace(fromNS, indexName); - string newIndexNs = IndexDescriptor::makeIndexNamespace(toNS, indexName); + std::string oldIndexNs = IndexDescriptor::makeIndexNamespace(fromNS, indexName); + std::string newIndexNs = IndexDescriptor::makeIndexNamespace(toNS, indexName); Status s = _renameSingleNamespace(txn, oldIndexNs, newIndexNs, false); if (!s.isOK()) @@ -711,9 +711,9 @@ RecordStoreV1Base* MMAPV1DatabaseCatalogEntry::_getRecordStore(StringData ns) co IndexAccessMethod* MMAPV1DatabaseCatalogEntry::getIndex(OperationContext* txn, const CollectionCatalogEntry* collection, IndexCatalogEntry* entry) { - const string& type = entry->descriptor()->getAccessMethodName(); + const std::string& type = entry->descriptor()->getAccessMethodName(); - string ns = collection->ns().ns(); + std::string ns = collection->ns().ns(); RecordStoreV1Base* rs = _getRecordStore(entry->descriptor()->indexNamespace()); invariant(rs); |