summaryrefslogtreecommitdiff
path: root/src/mongo/db/field_ref_set.h
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-09-23 19:45:37 -0400
committerAndrew Morrow <acm@10gen.com>2013-09-25 14:21:49 -0400
commit2f23c6ecb941d94fa7705475f47634ee57205e82 (patch)
treed239d3332b7bec0173cf6a23c8447c143ce621c0 /src/mongo/db/field_ref_set.h
parent03095b15c71886456ac46a315ea03614bb7aced4 (diff)
downloadmongo-2f23c6ecb941d94fa7705475f47634ee57205e82.tar.gz
SERVER-10159 Don't perform update field conflict detection when no conflict is possible
Diffstat (limited to 'src/mongo/db/field_ref_set.h')
-rw-r--r--src/mongo/db/field_ref_set.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/field_ref_set.h b/src/mongo/db/field_ref_set.h
index f84b14dc3db..5abd0ad9892 100644
--- a/src/mongo/db/field_ref_set.h
+++ b/src/mongo/db/field_ref_set.h
@@ -56,6 +56,11 @@ namespace mongo {
*/
bool insert(const FieldRef* toInsert, const FieldRef** conflict);
+ /** Returns 'true' if the set is empty */
+ bool empty() const {
+ return _fieldSet.empty();
+ }
+
private:
struct FieldRefPtrLessThan {
bool operator()(const FieldRef* lhs, const FieldRef* rhs) const;