From 5208e7952d691e256a4ffe29888154068e8745b8 Mon Sep 17 00:00:00 2001 From: cmumford Date: Mon, 29 Jun 2015 14:40:59 -0700 Subject: [PATCH] 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 --- include/leveldb/status.h | 3 +++ 1 file changed, 3 insertions(+) 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;