You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/03/28 09:11:08 UTC
[GitHub] [incubator-brpc] wwbmmm commented on a change in pull request #1723: Fix build warning, ByteSize() is deprecated, use ByteSizeLong() instead
wwbmmm commented on a change in pull request #1723:
URL: https://github.com/apache/incubator-brpc/pull/1723#discussion_r836211988
##########
File path: src/brpc/policy/hulu_pbrpc_protocol.cpp
##########
@@ -152,7 +152,11 @@ inline void PackHuluHeader(char* hulu_header, int meta_size, int body_size) {
template <typename Meta>
static void SerializeHuluHeaderAndMeta(
butil::IOBuf* out, const Meta& meta, int payload_size) {
+ #if GOOGLE_PROTOBUF_VERSION >= 3010000
Review comment:
这段 #if else的代码出现得比较多,是不是可以封装成一个函数,比如GetPbByteSize
##########
File path: src/brpc/policy/hulu_pbrpc_protocol.cpp
##########
@@ -152,7 +152,11 @@ inline void PackHuluHeader(char* hulu_header, int meta_size, int body_size) {
template <typename Meta>
static void SerializeHuluHeaderAndMeta(
butil::IOBuf* out, const Meta& meta, int payload_size) {
+ #if GOOGLE_PROTOBUF_VERSION >= 3010000
Review comment:
#if 等指令不需要缩进
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org