You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2012/04/13 16:50:33 UTC
svn commit: r1325792 -
/thrift/trunk/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
Author: roger
Date: Fri Apr 13 14:50:32 2012
New Revision: 1325792
URL: http://svn.apache.org/viewvc?rev=1325792&view=rev
Log:
THRIFT-1566 Thrift/cpp: Use some different string operations
Modified:
thrift/trunk/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
Modified: thrift/trunk/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc?rev=1325792&r1=1325791&r2=1325792&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc (original)
+++ thrift/trunk/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc Fri Apr 13 14:50:32 2012
@@ -428,7 +428,7 @@ uint32_t TBinaryProtocolT<Transport_>::r
// Catch empty string case
if (size == 0) {
- str = "";
+ str.clear();
return result;
}
@@ -451,7 +451,7 @@ uint32_t TBinaryProtocolT<Transport_>::r
this->string_buf_size_ = size;
}
this->trans_->readAll(this->string_buf_, size);
- str = std::string((char*)this->string_buf_, size);
+ str.assign((char*)this->string_buf_, size);
return (uint32_t)size;
}