Use the canonical file name also for the "already open" check
[GPXSee.git] / src / GUI / searchpointer.h
blobebbbb9a0058929af4974c0d91cd44dec3fa43fa3
1 #ifndef SEARCHPOINTER_H
2 #define SEARCHPOINTER_H
4 #include "common/hash.h"
6 template <class T>
7 class SearchPointer
9 public:
10 SearchPointer(const T *ptr) : _ptr(ptr) {}
12 const T *data() const {return _ptr;}
13 bool operator==(const SearchPointer<T> &other) const
14 {return *data() == *(other.data());}
16 private:
17 const T *_ptr;
20 template <class T>
21 inline HASH_T qHash(const SearchPointer<T> &t)
23 return ::qHash(*(t.data()));
26 #endif // SEARCHPOINTER_H