diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 9c08c15ae..1e8a665d7 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -180,7 +180,7 @@ namespace { } - T operator()(T val) + T operator()(T val) const { return val <= m_limit ? m_ret : val; } diff --git a/src/base/bittorrent/trackerentry.cpp b/src/base/bittorrent/trackerentry.cpp index 14f98e738..824f8f1ba 100644 --- a/src/base/bittorrent/trackerentry.cpp +++ b/src/base/bittorrent/trackerentry.cpp @@ -84,7 +84,7 @@ TrackerEntry &TrackerEntry::operator=(const TrackerEntry &other) return *this; } -bool TrackerEntry::operator==(const TrackerEntry &other) +bool TrackerEntry::operator==(const TrackerEntry &other) const { return (QUrl(url()) == QUrl(other.url())); } diff --git a/src/base/bittorrent/trackerentry.h b/src/base/bittorrent/trackerentry.h index f9d2187c4..fcaf9af7d 100644 --- a/src/base/bittorrent/trackerentry.h +++ b/src/base/bittorrent/trackerentry.h @@ -60,7 +60,7 @@ namespace BitTorrent void setTier(int value); TrackerEntry &operator=(const TrackerEntry &other); - bool operator==(const TrackerEntry &other); + bool operator==(const TrackerEntry &other) const; libtorrent::announce_entry nativeEntry() const;