summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordejank-isystem <119041215+dejank-isystem@users.noreply.github.com>2023-02-14 13:34:26 +0100
committerJens Geyer <Jens-G@users.noreply.github.com>2023-02-21 22:55:01 +0100
commit4fcd0725b837dc65842638b9d2f5167bedd15399 (patch)
tree87c72f1ae967c3568f6d0b19991757c8d8f3785c
parentd96b17740c52734714afc77a83147d06f3ea70da (diff)
downloadthrift-4fcd0725b837dc65842638b9d2f5167bedd15399.tar.gz
lib/cpp: Fix MSVC warning C4706 (BinaryProtocol)
MSVC warning C4706: assignment within conditional expression
-rw-r--r--lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
index 755f24386..c448e77c3 100644
--- a/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
+++ b/lib/cpp/src/thrift/protocol/TBinaryProtocol.tcc
@@ -448,9 +448,9 @@ uint32_t TBinaryProtocolT<Transport_, ByteOrder_>::readStringBody(StrType& str,
}
// Try to borrow first
- const uint8_t* borrow_buf;
uint32_t got = size;
- if ((borrow_buf = this->trans_->borrow(nullptr, &got))) {
+ const uint8_t* borrow_buf = this->trans_->borrow(nullptr, &got);
+ if (borrow_buf) {
str.assign((const char*)borrow_buf, size);
this->trans_->consume(size);
return size;