diff options
author | Samy Lanka <samy.lanka@mongodb.com> | 2021-06-08 14:39:09 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-15 15:03:11 +0000 |
commit | 3216ffe95a12ff873aa2ea5bc01a693b16540de5 (patch) | |
tree | 08049eee1c55c87c94adcc1e4045fcf2e25a6968 | |
parent | 63569e3795cc95e7b94d6e95cff7525c7280f874 (diff) | |
download | mongo-3216ffe95a12ff873aa2ea5bc01a693b16540de5.tar.gz |
SERVER-57142 Fix type qualifiers on return types in read_write_concern_provenance.h
(cherry picked from commit 3f00b0cd01d4231fd22820fe63bdae2511489eda)
-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; } |