summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_entry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/oplog_entry.cpp')
-rw-r--r--src/mongo/db/repl/oplog_entry.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/repl/oplog_entry.cpp b/src/mongo/db/repl/oplog_entry.cpp
index 45fafaf06e8..722ed0e596c 100644
--- a/src/mongo/db/repl/oplog_entry.cpp
+++ b/src/mongo/db/repl/oplog_entry.cpp
@@ -227,8 +227,9 @@ bool OplogEntry::isCommand() const {
return getOpType() == OpTypeEnum::kCommand;
}
-bool OplogEntry::isCrudOpType() const {
- switch (getOpType()) {
+// static
+bool OplogEntry::isCrudOpType(OpTypeEnum opType) {
+ switch (opType) {
case OpTypeEnum::kInsert:
case OpTypeEnum::kDelete:
case OpTypeEnum::kUpdate:
@@ -240,6 +241,10 @@ bool OplogEntry::isCrudOpType() const {
MONGO_UNREACHABLE;
}
+bool OplogEntry::isCrudOpType() const {
+ return isCrudOpType(getOpType());
+}
+
BSONElement OplogEntry::getIdElement() const {
invariant(isCrudOpType());
if (getOpType() == OpTypeEnum::kUpdate) {