This repository was archived by the owner on Dec 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ StatusOr<Bytes> BytesFromBase64(std::string input) {
148148}
149149
150150// Conversion to a base64-encoded US-ASCII `std::string`.
151- std::string BytesToBase64 (Bytes const & b) { return b.base64_rep_ ; }
151+ std::string BytesToBase64 (Bytes b) { return std::move ( b.base64_rep_ ) ; }
152152
153153} // namespace internal
154154} // namespace SPANNER_CLIENT_NS
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class Bytes; // defined below
3232// Internal forward declarations to befriend.
3333namespace internal {
3434StatusOr<Bytes> BytesFromBase64 (std::string input);
35- std::string BytesToBase64 (Bytes const & b);
35+ std::string BytesToBase64 (Bytes b);
3636} // namespace internal
3737
3838/* *
@@ -79,7 +79,7 @@ class Bytes {
7979
8080 private:
8181 friend StatusOr<Bytes> internal::BytesFromBase64 (std::string input);
82- friend std::string internal::BytesToBase64 (Bytes const & b);
82+ friend std::string internal::BytesToBase64 (Bytes b);
8383
8484 struct Encoder {
8585 Encoder (std::string& rep) : rep_(rep), len_(0 ) {}
Original file line number Diff line number Diff line change @@ -232,9 +232,9 @@ google::protobuf::Value Value::MakeValueProto(std::string s) {
232232 return v;
233233}
234234
235- google::protobuf::Value Value::MakeValueProto (Bytes const & bytes) {
235+ google::protobuf::Value Value::MakeValueProto (Bytes bytes) {
236236 google::protobuf::Value v;
237- v.set_string_value (internal::BytesToBase64 (bytes));
237+ v.set_string_value (internal::BytesToBase64 (std::move ( bytes) ));
238238 return v;
239239}
240240
Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ class Value {
428428 static google::protobuf::Value MakeValueProto (std::int64_t i);
429429 static google::protobuf::Value MakeValueProto (double d);
430430 static google::protobuf::Value MakeValueProto (std::string s);
431- static google::protobuf::Value MakeValueProto (Bytes const & b);
431+ static google::protobuf::Value MakeValueProto (Bytes b);
432432 static google::protobuf::Value MakeValueProto (Timestamp ts);
433433 static google::protobuf::Value MakeValueProto (Date d);
434434 static google::protobuf::Value MakeValueProto (int i);
You can’t perform that action at this time.
0 commit comments