summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replica_set_tag.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replica_set_tag.cpp')
-rw-r--r--src/mongo/db/repl/replica_set_tag.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/repl/replica_set_tag.cpp b/src/mongo/db/repl/replica_set_tag.cpp
index 05363498fcd..1d6fcc0766d 100644
--- a/src/mongo/db/repl/replica_set_tag.cpp
+++ b/src/mongo/db/repl/replica_set_tag.cpp
@@ -104,7 +104,7 @@ namespace repl {
return constraint.getMinCount() <= int32_t(boundValues.size());
}
- ReplicaSetTag ReplicaSetTagConfig::makeTag(const StringData& key, const StringData& value) {
+ ReplicaSetTag ReplicaSetTagConfig::makeTag(StringData key, StringData value) {
int32_t keyIndex = _findKeyIndex(key);
if (size_t(keyIndex) == _tagData.size()) {
_tagData.push_back(make_pair(key.toString(), ValueVector()));
@@ -119,8 +119,8 @@ namespace repl {
return ReplicaSetTag(keyIndex, int32_t(values.size()) - 1);
}
- ReplicaSetTag ReplicaSetTagConfig::findTag(const StringData& key,
- const StringData& value) const {
+ ReplicaSetTag ReplicaSetTagConfig::findTag(StringData key,
+ StringData value) const {
int32_t keyIndex = _findKeyIndex(key);
if (size_t(keyIndex) == _tagData.size())
return ReplicaSetTag(-1, -1);
@@ -138,7 +138,7 @@ namespace repl {
}
Status ReplicaSetTagConfig::addTagCountConstraintToPattern(ReplicaSetTagPattern* pattern,
- const StringData& tagKey,
+ StringData tagKey,
int32_t minCount) const {
int32_t keyIndex = _findKeyIndex(tagKey);
if (size_t(keyIndex) == _tagData.size()) {
@@ -149,7 +149,7 @@ namespace repl {
return Status::OK();
}
- int32_t ReplicaSetTagConfig::_findKeyIndex(const StringData& key) const {
+ int32_t ReplicaSetTagConfig::_findKeyIndex(StringData key) const {
size_t i;
for (i = 0; i < _tagData.size(); ++i) {
if (_tagData[i].first == key) {