Replace size() method with empty() when possible.
There is no guaranteed that size() is a constant-time function.
This commit is contained in:
parent
e4c571fc68
commit
d18b34d55f
4 changed files with 5 additions and 6 deletions
|
@ -67,7 +67,7 @@ DevToolsNetworkInterceptor*
|
|||
DevToolsNetworkController::GetInterceptor(const std::string& client_id) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
|
||||
if (!interceptors_.size() || client_id.empty())
|
||||
if (interceptors_.empty() || client_id.empty())
|
||||
return nullptr;
|
||||
|
||||
DevToolsNetworkInterceptor* interceptor = interceptors_.get(client_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue