diff options
author | Tamir Duberstein <tamird@google.com> | 2019-04-25 14:11:32 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-25 14:12:51 -0700 |
commit | 9c638f1beb117282e2c586761c8b44be9aabba86 (patch) | |
tree | 67257fe197166e6a9eb51e48c1023b89ac2c0eca /test/util | |
parent | 03be9ae88ca857da4f2243d17b06bd5bc38f88db (diff) |
Remove useless modifiers
PiperOrigin-RevId: 245304611
Change-Id: Ie0e9bfc03d064e41d50157eeb4df22b2635f41e2
Diffstat (limited to 'test/util')
-rw-r--r-- | test/util/posix_error.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/util/posix_error.h b/test/util/posix_error.h index d4bdf8407..2a66e2e94 100644 --- a/test/util/posix_error.h +++ b/test/util/posix_error.h @@ -95,10 +95,10 @@ class ABSL_MUST_USE_RESULT PosixErrorOr { PosixErrorOr& operator=(PosixErrorOr<U> other); // Return a reference to the error or NoError(). - const PosixError error() const; + PosixError error() const; // Returns this->error().error_message(); - const std::string error_message() const; + std::string error_message() const; // Returns true if this PosixErrorOr contains some T. bool ok() const; @@ -115,7 +115,7 @@ class ABSL_MUST_USE_RESULT PosixErrorOr { void IgnoreError() const {} private: - const int errno_value() const; + int errno_value() const; absl::variant<T, PosixError> value_; friend class PosixErrorIsMatcherCommonImpl; @@ -163,7 +163,7 @@ inline PosixErrorOr<T>& PosixErrorOr<T>::operator=(PosixErrorOr<U> other) { } template <typename T> -const PosixError PosixErrorOr<T>::error() const { +PosixError PosixErrorOr<T>::error() const { if (!absl::holds_alternative<PosixError>(value_)) { return PosixError(); } @@ -171,12 +171,12 @@ const PosixError PosixErrorOr<T>::error() const { } template <typename T> -const int PosixErrorOr<T>::errno_value() const { +int PosixErrorOr<T>::errno_value() const { return error().errno_value(); } template <typename T> -const std::string PosixErrorOr<T>::error_message() const { +std::string PosixErrorOr<T>::error_message() const { return error().error_message(); } |