You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pegasus.apache.org by GitBox <gi...@apache.org> on 2022/10/27 03:55:19 UTC
[GitHub] [incubator-pegasus] acelyc111 commented on a diff in pull request #1205: refactor(macro): Use CHECK to replace dassert_f/dassert
acelyc111 commented on code in PR #1205:
URL: https://github.com/apache/incubator-pegasus/pull/1205#discussion_r1006380970
##########
src/redis_protocol/proxy_lib/redis_parser.cpp:
##########
@@ -369,7 +368,7 @@ void redis_parser::reply_all_ready()
std::vector<dsn::message_ex *> ready_responses;
fetch_and_dequeue_messages(ready_responses, true);
for (dsn::message_ex *m : ready_responses) {
- dassert(m != nullptr, "");
+ CHECK(m, "");
Review Comment:
Both are OK.
But in the future refactor, we are going to introduce `CHECK_EQ` and `CHECK_NE`, it's a bit of duplicate and strange if we judge the pointer like `CHECK_NE(pointer, nullptr)`. I also consulted some other projects' habit, both styles are OK.
--
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@pegasus.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pegasus.apache.org
For additional commands, e-mail: dev-help@pegasus.apache.org