Skip to content
Snippets Groups Projects
Commit 6426e7d7 authored by Thai Duong's avatar Thai Duong Committed by Tink Team
Browse files

Add shims to convert Tink Status/StatusOr to google3.

PiperOrigin-RevId: 203384667
GitOrigin-RevId: be4aa4ef88d1b6bba81a4a63a2c40d038b014854
parent 423dfa9b
No related branches found
No related tags found
No related merge requests found
......@@ -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_;
......
......@@ -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_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment