summaryrefslogtreecommitdiff
path: root/src/FeedbackURISelector.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
commit4db349c1f32b4a313d12d114137432441633d00a (patch)
tree417451971e264834312cfd8339c79930d680a5d1 /src/FeedbackURISelector.cc
parent338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff)
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
Diffstat (limited to 'src/FeedbackURISelector.cc')
-rw-r--r--src/FeedbackURISelector.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/FeedbackURISelector.cc b/src/FeedbackURISelector.cc
index f20d4286..41abf154 100644
--- a/src/FeedbackURISelector.cc
+++ b/src/FeedbackURISelector.cc
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
@@ -53,7 +53,7 @@ FeedbackURISelector::~FeedbackURISelector() {}
class ServerStatFaster {
public:
bool operator()(const std::pair<SharedHandle<ServerStat>, std::string> lhs,
- const std::pair<SharedHandle<ServerStat>, std::string> rhs)
+ const std::pair<SharedHandle<ServerStat>, std::string> rhs)
const
{
return lhs.first->getDownloadSpeed() > rhs.first->getDownloadSpeed();
@@ -78,23 +78,23 @@ std::string FeedbackURISelector::select(FileEntry* fileEntry)
Request r;
r.setUrl(*i);
SharedHandle<ServerStat> ss = _serverStatMan->find(r.getHost(),
- r.getProtocol());
+ r.getProtocol());
if(!ss.isNull() && ss->isOK() && ss->getDownloadSpeed() > SPEED_THRESHOLD) {
cands.push_back(std::pair<SharedHandle<ServerStat>, std::string>(ss, *i));
}
}
if(cands.empty()) {
for(std::deque<std::string>::iterator i = uris.begin();
- i != uris.end(); ++i) {
+ i != uris.end(); ++i) {
Request r;
r.setUrl(*i);
SharedHandle<ServerStat> ss = _serverStatMan->find(r.getHost(),
- r.getProtocol());
+ r.getProtocol());
// Skip ERROR state URI
if(ss.isNull() || ss->isOK()) {
- std::string nextURI = *i;
- uris.erase(uris.begin(), i+1);
- return nextURI;
+ std::string nextURI = *i;
+ uris.erase(uris.begin(), i+1);
+ return nextURI;
}
}
// All URIs are inspected but aria2 cannot find usable one.