diff --git a/ChangeLog b/ChangeLog index 322630ea..2f7c6bda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-06-08 Tatsuhiro Tsujikawa + + Use empty() instead of size() > 0. + * src/HttpConnection.cc + 2008-06-08 Tatsuhiro Tsujikawa Drop connection if the incoming peer ID is the same with localhost's diff --git a/src/HttpConnection.cc b/src/HttpConnection.cc index 88acf0de..dbda02be 100644 --- a/src/HttpConnection.cc +++ b/src/HttpConnection.cc @@ -112,7 +112,7 @@ void HttpConnection::sendProxyRequest(const HttpRequestHandle& httpRequest) HttpResponseHandle HttpConnection::receiveResponse() { - if(outstandingHttpRequests.size() == 0) { + if(outstandingHttpRequests.empty()) { throw DlAbortEx(EX_NO_HTTP_REQUEST_ENTRY_FOUND); } HttpRequestEntryHandle entry = outstandingHttpRequests.front();