acelyc111 commented on code in PR #1378:
URL: 
https://github.com/apache/incubator-pegasus/pull/1378#discussion_r1130543679


##########
src/common/json_helper.h:
##########
@@ -335,6 +337,23 @@ INT_TYPE_SERIALIZATION(int16_t)
 INT_TYPE_SERIALIZATION(int32_t)
 INT_TYPE_SERIALIZATION(int64_t)
 
+template <typename Writer>
+inline void json_encode(Writer &out, dsn::ranger::access_type t)
+{
+    out.Uint64(static_cast<uint64_t>(t));
+}
+
+inline bool json_decode(const JsonObject &in, dsn::ranger::access_type &t)
+{
+    dverify(in.IsUint64());
+    int64_t ans = in.GetUint64();
+    int64_t act_min = static_cast<uint64_t>(dsn::ranger::access_type_min);
+    int64_t act_max = static_cast<uint64_t>(dsn::ranger::access_type_max);

Review Comment:
   better to use `uint64_t` or `auto`, since you have used `GetUint64` and 
`static_cast<uint64_t>`



-- 
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