Mercurial > dedupe
comparison OrderedPair.hpp @ 0:a3834af36579
Working with memory backend.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Mon, 20 Aug 2012 15:49:48 +0200 |
| parents | |
| children | b5943e4bf676 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:a3834af36579 |
|---|---|
| 1 #ifndef ORDEREDPAIR_HPP | |
| 2 #define ORDEREDPAIR_HPP | |
| 3 | |
| 4 #include <QtCore/QPair> | |
| 5 | |
| 6 template <typename S> | |
| 7 class OrderedPair : public QPair<S, S> | |
| 8 { | |
| 9 public: | |
| 10 OrderedPair(const S& a, const S&b) : QPair<S, S>(a<b?a:b, a<b?b:a) | |
| 11 { | |
| 12 } | |
| 13 }; | |
| 14 | |
| 15 #endif //ORDEREDPAIR_HPP |
