Skip to content

Commit

Permalink
Remove empty checks which can be avoid
Browse files Browse the repository at this point in the history
  • Loading branch information
wxf committed Jan 7, 2021
1 parent 716d36e commit 0deb207
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/brpc_naming_service_unittest.cpp
Expand Up @@ -581,10 +581,8 @@ class DiscoveryNamingServiceImpl : public test::DiscoveryNamingService {
brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base);
auto body = cntl->request_attachment().to_string();
for (brpc::QuerySplitter sp(body); sp; ++sp) {
if (!sp.key().empty()) {
if (sp.key() == "addrs") {
_addrs.insert(sp.value().as_string());
}
if (sp.key() == "addrs") {
_addrs.insert(sp.value().as_string());
}
}
cntl->response_attachment().append(R"({
Expand Down

0 comments on commit 0deb207

Please sign in to comment.