npapi-vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Wed Mar 
25 15:17:37 2015 +0100| [c99183fe39a532c6c259782de00c57d02d6d69a3] | committer: 
Hugo Beauzée-Luyssen

npapi: utils: Variant: Allow comparison operations

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=c99183fe39a532c6c259782de00c57d02d6d69a3
---

 npapi/utils.hpp |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/npapi/utils.hpp b/npapi/utils.hpp
index 56d6805..0310297 100644
--- a/npapi/utils.hpp
+++ b/npapi/utils.hpp
@@ -412,6 +412,30 @@ public:
         return &m_variant;
     }
 
+    template <typename T>
+    bool operator<(const T& rhs) const
+    {
+        return (const T)*this < rhs;
+    }
+
+    template <typename T>
+    bool operator<=(const T& rhs) const
+    {
+        return (const T)*this <= rhs;
+    }
+
+    template <typename T>
+    bool operator>(const T& rhs) const
+    {
+        return (const T)*this > rhs;
+    }
+
+    template <typename T>
+    bool operator>=(const T& rhs) const
+    {
+        return (const T)*this >= rhs;
+    }
+
     ~Variant()
     {
         release();

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to