diff options
author | Mathias Stearn <mathias@10gen.com> | 2016-05-06 14:09:50 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2016-05-09 17:52:12 -0400 |
commit | 26586d84484c16f3d5aa7ab4cad87552e4b8bc5f (patch) | |
tree | fbfd4e3fd4e3280cc28914d0664e9469a775e96f /src/mongo/base/status_with.h | |
parent | fb439046f73ce10b862750df853746c41e9e2e81 (diff) | |
download | mongo-26586d84484c16f3d5aa7ab4cad87552e4b8bc5f.tar.gz |
SERVER-24082 Move std::string construction into Status constructor
Previously it was done at every call site that used string literals.
Diffstat (limited to 'src/mongo/base/status_with.h')
-rw-r--r-- | src/mongo/base/status_with.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/base/status_with.h b/src/mongo/base/status_with.h index 2b2dff99d28..66880385ab4 100644 --- a/src/mongo/base/status_with.h +++ b/src/mongo/base/status_with.h @@ -71,6 +71,14 @@ public: std::string reason, int location = 0) : _status(code, std::move(reason), location) {} + MONGO_COMPILER_COLD_FUNCTION StatusWith(ErrorCodes::Error code, + const char* reason, + int location = 0) + : _status(code, reason, location) {} + MONGO_COMPILER_COLD_FUNCTION StatusWith(ErrorCodes::Error code, + const mongoutils::str::stream& reason, + int location = 0) + : _status(code, reason, location) {} /** * for the error case |