From 9c638f1beb117282e2c586761c8b44be9aabba86 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Thu, 25 Apr 2019 14:11:32 -0700 Subject: Remove useless modifiers PiperOrigin-RevId: 245304611 Change-Id: Ie0e9bfc03d064e41d50157eeb4df22b2635f41e2 --- test/util/posix_error.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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 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 value_; friend class PosixErrorIsMatcherCommonImpl; @@ -163,7 +163,7 @@ inline PosixErrorOr& PosixErrorOr::operator=(PosixErrorOr other) { } template -const PosixError PosixErrorOr::error() const { +PosixError PosixErrorOr::error() const { if (!absl::holds_alternative(value_)) { return PosixError(); } @@ -171,12 +171,12 @@ const PosixError PosixErrorOr::error() const { } template -const int PosixErrorOr::errno_value() const { +int PosixErrorOr::errno_value() const { return error().errno_value(); } template -const std::string PosixErrorOr::error_message() const { +std::string PosixErrorOr::error_message() const { return error().error_message(); } -- cgit v1.2.3