Explorar o código

Document setUri() in FileEntry does not need to check the return value.

Nils Maier %!s(int64=11) %!d(string=hai) anos
pai
achega
d72df551ba
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/FileEntry.cc

+ 2 - 1
src/FileEntry.cc

@@ -295,7 +295,8 @@ FileEntry::findFasterRequest
     std::shared_ptr<Request> fastestRequest(new Request());
     const std::string& uri = fastCands.front().second;
     A2_LOG_DEBUG(fmt("Selected %s from fastCands", uri.c_str()));
-    fastestRequest->setUri(uri);
+    // Candidate URIs where already parsed when populating fastCands.
+    (void)fastestRequest->setUri(uri);
     fastestRequest->setReferer(base->getReferer());
     uris_.erase(std::find(uris_.begin(), uris_.end(), uri));
     spentUris_.push_back(uri);