From ecb922e013e9bd6d55c169ca7f04a87d08dd2ea3 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 26 Oct 2009 20:12:57 +0000 Subject: [PATCH] fix comparison operator of web_seed_entry --- include/libtorrent/torrent.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 496bf9558..b8ef0a730 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -106,7 +106,11 @@ namespace libtorrent { return url == e.url && type == e.type; } bool operator<(web_seed_entry const& e) const - { return url < e.url ? true : type < e.type; } + { + if (url < e.url) return true; + if (url > e.url) return false; + return type < e.type; + } }; // a torrent is a class that holds information