summaryrefslogtreecommitdiff
path: root/src/MetalinkEntry.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/MetalinkEntry.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/MetalinkEntry.cc')
-rw-r--r--src/MetalinkEntry.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/MetalinkEntry.cc b/src/MetalinkEntry.cc
index af8dfb0a..40b73fab 100644
--- a/src/MetalinkEntry.cc
+++ b/src/MetalinkEntry.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
@@ -103,10 +103,10 @@ uint64_t MetalinkEntry::getLength() const
}
void MetalinkEntry::setLocationPreference(const std::deque<std::string>& locations,
- int preferenceToAdd)
+ int preferenceToAdd)
{
std::for_each(resources.begin(), resources.end(),
- AddLocationPreference(locations, preferenceToAdd));
+ AddLocationPreference(locations, preferenceToAdd));
}
class AddProtocolPreference {
@@ -126,23 +126,23 @@ public:
};
void MetalinkEntry::setProtocolPreference(const std::string& protocol,
- int preferenceToAdd)
+ int preferenceToAdd)
{
std::for_each(resources.begin(), resources.end(),
- AddProtocolPreference(protocol, preferenceToAdd));
+ AddProtocolPreference(protocol, preferenceToAdd));
}
class PrefOrder {
public:
bool operator()(const SharedHandle<MetalinkResource>& res1,
- const SharedHandle<MetalinkResource>& res2) {
+ const SharedHandle<MetalinkResource>& res2) {
return res1->preference > res2->preference;
}
};
void MetalinkEntry::reorderResourcesByPreference() {
std::random_shuffle(resources.begin(), resources.end(),
- *(SimpleRandomizer::getInstance().get()));
+ *(SimpleRandomizer::getInstance().get()));
std::sort(resources.begin(), resources.end(), PrefOrder());
}
@@ -168,8 +168,8 @@ public:
void MetalinkEntry::dropUnsupportedResource() {
resources.erase(std::remove_if(resources.begin(), resources.end(),
- std::not1(Supported())),
- resources.end());
+ std::not1(Supported())),
+ resources.end());
}
void MetalinkEntry::toFileEntry
@@ -177,8 +177,8 @@ void MetalinkEntry::toFileEntry
const std::deque<SharedHandle<MetalinkEntry> >& metalinkEntries)
{
std::transform(metalinkEntries.begin(), metalinkEntries.end(),
- std::back_inserter(fileEntries),
- mem_fun_sh(&MetalinkEntry::getFile));
+ std::back_inserter(fileEntries),
+ mem_fun_sh(&MetalinkEntry::getFile));
}
void MetalinkEntry::setSignature(const SharedHandle<Signature>& signature)