summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/index_descriptor.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-09-22 16:55:44 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-09-22 17:56:07 -0400
commit63864ff42e0402b65f5fa45635b0a76baf671aa8 (patch)
treedc31e0eba898685de4ddd6f1fd30b0d7776c68b8 /src/mongo/db/index/index_descriptor.h
parent0ef4cce98ab2bb45e2fa6e947014795148925d74 (diff)
downloadmongo-63864ff42e0402b65f5fa45635b0a76baf671aa8.tar.gz
SERVER-26248 Make IndexDescriptor string constants constexpr
Diffstat (limited to 'src/mongo/db/index/index_descriptor.h')
-rw-r--r--src/mongo/db/index/index_descriptor.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mongo/db/index/index_descriptor.h b/src/mongo/db/index/index_descriptor.h
index 8263641958b..d271e7e5f5a 100644
--- a/src/mongo/db/index/index_descriptor.h
+++ b/src/mongo/db/index/index_descriptor.h
@@ -56,18 +56,18 @@ class IndexDescriptor {
public:
enum class IndexVersion { kV0 = 0, kV1 = 1, kV2 = 2 };
- static const StringData k2dsphereVersionFieldName;
- static const StringData kBackgroundFieldName;
- static const StringData kCollationFieldName;
- static const StringData kDropDuplicatesFieldName;
- static const StringData kIndexNameFieldName;
- static const StringData kIndexVersionFieldName;
- static const StringData kKeyPatternFieldName;
- static const StringData kNamespaceFieldName;
- static const StringData kPartialFilterExprFieldName;
- static const StringData kSparseFieldName;
- static const StringData kTextVersionFieldName;
- static const StringData kUniqueFieldName;
+ static constexpr StringData k2dsphereVersionFieldName = "2dsphereIndexVersion"_sd;
+ static constexpr StringData kBackgroundFieldName = "background"_sd;
+ static constexpr StringData kCollationFieldName = "collation"_sd;
+ static constexpr StringData kDropDuplicatesFieldName = "dropDups"_sd;
+ static constexpr StringData kIndexNameFieldName = "name"_sd;
+ static constexpr StringData kIndexVersionFieldName = "v"_sd;
+ static constexpr StringData kKeyPatternFieldName = "key"_sd;
+ static constexpr StringData kNamespaceFieldName = "ns"_sd;
+ static constexpr StringData kPartialFilterExprFieldName = "partialFilterExpression"_sd;
+ static constexpr StringData kSparseFieldName = "sparse"_sd;
+ static constexpr StringData kTextVersionFieldName = "textIndexVersion"_sd;
+ static constexpr StringData kUniqueFieldName = "unique"_sd;
/**
* OnDiskIndexData is a pointer to the memory mapped per-index data.