From c07c9606edcc79907a24dbe3febff8ee0aa8512f Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Wed, 14 May 2014 16:23:40 -0700 Subject: [PATCH] Expose Status::code() --- include/rocksdb/status.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rocksdb/status.h b/include/rocksdb/status.h index dbd41fc9b..0298a2838 100644 --- a/include/rocksdb/status.h +++ b/include/rocksdb/status.h @@ -97,7 +97,6 @@ class Status { // Returns the string "OK" for success. std::string ToString() const; - private: enum Code { kOk = 0, kNotFound = 1, @@ -110,6 +109,10 @@ class Status { kShutdownInProgress = 8 }; + Code code() const { + return code_; + } + private: // A nullptr state_ (which is always the case for OK) means the message // is empty. // of the following form: @@ -118,9 +121,6 @@ class Status { Code code_; const char* state_; - Code code() const { - return code_; - } explicit Status(Code code) : code_(code), state_(nullptr) { } Status(Code code, const Slice& msg, const Slice& msg2); static const char* CopyState(const char* s);