Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
5346e72
)
THRIFT-1566 Thrift/cpp: Use some different string operations
author
Roger Meier
<roger@apache.org>
Fri, 13 Apr 2012 14:50:32 +0000
(14:50 +0000)
committer
Roger Meier
<roger@apache.org>
Fri, 13 Apr 2012 14:50:32 +0000
(14:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@
1325792
13f79535
-47bb-0310-9956-
ffa450edef68
lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
patch
|
blob
|
history
diff --git
a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
index
721e897
..
a95fdba
100644
(file)
--- a/
lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
+++ b/
lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
@@
-428,7
+428,7
@@
uint32_t TBinaryProtocolT<Transport_>::readStringBody(std::string& str,
// Catch empty string case
if (size == 0) {
- str
= ""
;
+ str
.clear()
;
return result;
}
@@
-451,7
+451,7
@@
uint32_t TBinaryProtocolT<Transport_>::readStringBody(std::string& str,
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;
}