summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcmumford <cmumford@google.com>2015-06-29 14:40:59 -0700
committerChris Mumford <cmumford@chromium.org>2015-12-09 10:34:57 -0800
commit5208e7952d691e256a4ffe29888154068e8745b8 (patch)
tree5015fd6cb6fbef45b319a05ab6891b8811044ad8 /include
parentce45404bba80d6f85057b596cd716d6c4759dcad (diff)
downloadleveldb-5208e7952d691e256a4ffe29888154068e8745b8.tar.gz
Added leveldb::Status::IsInvalidArgument() method.
All other Status::Code enum values have an Is**() method with the one exception of InvalidArgument. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=97166441
Diffstat (limited to 'include')
-rw-r--r--include/leveldb/status.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/leveldb/status.h b/include/leveldb/status.h
index d2bdc22..d9575f9 100644
--- a/include/leveldb/status.h
+++ b/include/leveldb/status.h
@@ -63,6 +63,9 @@ class Status {
// Returns true iff the status indicates a NotSupportedError.
bool IsNotSupportedError() const { return code() == kNotSupported; }
+ // Returns true iff the status indicates an InvalidArgument.
+ bool IsInvalidArgument() const { return code() == kInvalidArgument; }
+
// Return a string representation of this status suitable for printing.
// Returns the string "OK" for success.
std::string ToString() const;