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 2019/04/29 06:00:23 UTC
[GitHub] [incubator-brpc] lingbin opened a new issue #751: There is a
useless check in variable.cpp
lingbin opened a new issue #751: There is a useless check in variable.cpp
URL: https://github.com/apache/incubator-brpc/issues/751
https://github.com/apache/incubator-brpc/blob/cc6642bde45a804dc9fec95fa0c8b23432a12e15/src/bvar/variable.cpp#L203-L206
The check `if (names->size() < 32) ` is useless, because after a `std::vector.clear()`, its size is 0, so this is a useless check
I think the idea here should be to `resolve` the memory in advance, but the check here is really redundant, for it is always true
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org