mirror of https://github.com/aria2/aria2
Code cleanup: use empty() to check size() == 0
parent
7dc2b9ff16
commit
9e302b86df
|
@ -143,7 +143,7 @@ void DHTBucket::cacheNode(const SharedHandle<DHTNode>& node)
|
|||
|
||||
void DHTBucket::dropNode(const SharedHandle<DHTNode>& node)
|
||||
{
|
||||
if(cachedNodes_.size()) {
|
||||
if(!cachedNodes_.empty()) {
|
||||
std::deque<SharedHandle<DHTNode> >::iterator itr =
|
||||
std::find_if(nodes_.begin(), nodes_.end(), derefEqual(node));
|
||||
if(itr != nodes_.end()) {
|
||||
|
|
|
@ -219,7 +219,7 @@ std::string HttpRequest::createRequest()
|
|||
val += base64::encode(authText.begin(), authText.end());
|
||||
builtinHds.push_back(std::make_pair("Authorization:", val));
|
||||
}
|
||||
if(getPreviousURI().size()) {
|
||||
if(!getPreviousURI().empty()) {
|
||||
builtinHds.push_back(std::make_pair("Referer:", getPreviousURI()));
|
||||
}
|
||||
if(cookieStorage_) {
|
||||
|
|
Loading…
Reference in New Issue