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-08 15:42:04 +0000 |
commit | 3f00b0cd01d4231fd22820fe63bdae2511489eda (patch) | |
tree | d924b5eaec167db2030e3e2b4cd373f407a1e41b | |
parent | ac380b708355c26f2977e4f9eb1c393e15250317 (diff) | |
download | mongo-3f00b0cd01d4231fd22820fe63bdae2511489eda.tar.gz |
SERVER-56987 Fix type qualifiers on return types in 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; } |