[vlc-commits] demux: adaptive: add ID comparison operator
Francois Cartegnie
git at videolan.org
Wed Sep 21 18:52:30 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Sep 16 18:09:45 2016 +0200| [801fa95b2832e13eeb147c7267572c858ecf031f] | committer: Francois Cartegnie
demux: adaptive: add ID comparison operator
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=801fa95b2832e13eeb147c7267572c858ecf031f
---
modules/demux/adaptive/ID.cpp | 5 +++++
modules/demux/adaptive/ID.hpp | 1 +
2 files changed, 6 insertions(+)
diff --git a/modules/demux/adaptive/ID.cpp b/modules/demux/adaptive/ID.cpp
index b13156b..e7505c1 100644
--- a/modules/demux/adaptive/ID.cpp
+++ b/modules/demux/adaptive/ID.cpp
@@ -44,6 +44,11 @@ bool ID::operator==(const ID &other) const
return (!id.empty() && id == other.id);
}
+bool ID::operator<(const ID &other) const
+{
+ return (id.compare(other.id) < 0);
+}
+
std::string ID::str() const
{
return id;
diff --git a/modules/demux/adaptive/ID.hpp b/modules/demux/adaptive/ID.hpp
index 08b847b..d15720f 100644
--- a/modules/demux/adaptive/ID.hpp
+++ b/modules/demux/adaptive/ID.hpp
@@ -31,6 +31,7 @@ namespace adaptive
ID(const std::string &);
ID(uint64_t = 0);
bool operator==(const ID &) const;
+ bool operator<(const ID &) const;
std::string str() const;
private:
More information about the vlc-commits
mailing list