From 6426e7d7fd416aaade0d9b19dde151e0c3b6f102 Mon Sep 17 00:00:00 2001 From: Thai Duong <thaidn@google.com> Date: Thu, 5 Jul 2018 09:37:06 -0700 Subject: [PATCH] Add shims to convert Tink Status/StatusOr to google3. PiperOrigin-RevId: 203384667 GitOrigin-RevId: be4aa4ef88d1b6bba81a4a63a2c40d038b014854 --- cc/util/status.cc | 6 ++---- cc/util/status.h | 5 ++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cc/util/status.cc b/cc/util/status.cc index 3583960dc..4d6dde849 100644 --- a/cc/util/status.cc +++ b/cc/util/status.cc @@ -17,6 +17,7 @@ #include <sstream> #include "tink/util/status.h" +// placeholder_google3_status_header, please ignore" using ::std::ostream; @@ -40,6 +41,7 @@ const Status& GetUnknown() { } // namespace +// placeholder_implicit_type_conversion, please ignore Status::Status() : code_(::crypto::tink::util::error::OK), message_("") { } @@ -52,10 +54,6 @@ Status::Status(::crypto::tink::util::error::Code error, } } -Status::Status(const Status& other) - : code_(other.code_), message_(other.message_) { -} - Status& Status::operator=(const Status& other) { code_ = other.code_; message_ = other.message_; diff --git a/cc/util/status.h b/cc/util/status.h index 5a089f551..c8dc1a487 100644 --- a/cc/util/status.h +++ b/cc/util/status.h @@ -22,6 +22,8 @@ #include <string> +// placeholder_forward_declaration, please ignore + namespace crypto { namespace tink { namespace util { @@ -134,7 +136,6 @@ class Status { Status(::crypto::tink::util::error::Code error, const std::string& error_message); - Status(const Status& other); Status& operator=(const Status& other); // Some pre-defined Status objects @@ -165,6 +166,8 @@ class Status { std::string ToString() const; + // placeholder_implicit_type_conversion, please ignore + private: ::crypto::tink::util::error::Code code_; std::string message_; -- GitLab