diff options
Diffstat (limited to 'src/mongo/db/read_write_concern_provenance.h')
-rw-r--r-- | src/mongo/db/read_write_concern_provenance.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/read_write_concern_provenance.h b/src/mongo/db/read_write_concern_provenance.h index 57b4f9f64f5..09b8647d88c 100644 --- a/src/mongo/db/read_write_concern_provenance.h +++ b/src/mongo/db/read_write_concern_provenance.h @@ -102,7 +102,7 @@ public: /** * Returns true if this provenance has been set to an actual source, or false if it is unset. */ - const bool hasSource() const { + bool hasSource() const { return static_cast<bool>(getSource()); } @@ -111,21 +111,21 @@ public: * either unset (the client specified RWC but without provenance) or explicitly the * "clientSupplied" source. */ - const bool isClientSupplied() const { + bool isClientSupplied() const { return !hasSource() || *getSource() == Source::clientSupplied; } /** * Returns true if the RWC was an implicit default. */ - const bool isImplicitDefault() const { + bool isImplicitDefault() const { return hasSource() && *getSource() == Source::implicitDefault; } /** * Returns true if the RWC was a custom default. */ - const bool isCustomDefault() const { + bool isCustomDefault() const { return hasSource() && *getSource() == Source::customDefault; } |