diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-06-14 16:42:10 -0400 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-06-14 19:23:18 -0400 |
commit | 47b380f03e8898f4706ff01fa2be64dfb72e0dba (patch) | |
tree | fb3508758c9abd0e297afee43ac847bf5aebcbbb /src/mongo/db/query/index_tag.cpp | |
parent | b3c26131f6ab3f919beca658341e737de5d45683 (diff) | |
download | mongo-47b380f03e8898f4706ff01fa2be64dfb72e0dba.tar.gz |
SERVER-41071 Replace NULL and 0 with nullptr
Diffstat (limited to 'src/mongo/db/query/index_tag.cpp')
-rw-r--r-- | src/mongo/db/query/index_tag.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/query/index_tag.cpp b/src/mongo/db/query/index_tag.cpp index 0381e2ac9ba..61e0204d3da 100644 --- a/src/mongo/db/query/index_tag.cpp +++ b/src/mongo/db/query/index_tag.cpp @@ -45,12 +45,12 @@ namespace { bool TagComparison(const MatchExpression* lhs, const MatchExpression* rhs) { IndexTag* lhsTag = static_cast<IndexTag*>(lhs->getTag()); - size_t lhsValue = (NULL == lhsTag) ? IndexTag::kNoIndex : lhsTag->index; - size_t lhsPos = (NULL == lhsTag) ? IndexTag::kNoIndex : lhsTag->pos; + size_t lhsValue = (nullptr == lhsTag) ? IndexTag::kNoIndex : lhsTag->index; + size_t lhsPos = (nullptr == lhsTag) ? IndexTag::kNoIndex : lhsTag->pos; IndexTag* rhsTag = static_cast<IndexTag*>(rhs->getTag()); - size_t rhsValue = (NULL == rhsTag) ? IndexTag::kNoIndex : rhsTag->index; - size_t rhsPos = (NULL == rhsTag) ? IndexTag::kNoIndex : rhsTag->pos; + size_t rhsValue = (nullptr == rhsTag) ? IndexTag::kNoIndex : rhsTag->index; + size_t rhsPos = (nullptr == rhsTag) ? IndexTag::kNoIndex : rhsTag->pos; // First, order on indices. if (lhsValue != rhsValue) { @@ -94,7 +94,7 @@ void sortUsingTags(MatchExpression* tree) { sortUsingTags(tree->getChild(i)); } std::vector<MatchExpression*>* children = tree->getChildVector(); - if (NULL != children) { + if (nullptr != children) { std::sort(children->begin(), children->end(), TagComparison); } } |