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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to