1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-03 16:09:08 +01:00
GPXSee/src/GUI/searchpointer.h

27 lines
460 B
C
Raw Normal View History

#ifndef SEARCHPOINTER_H
#define SEARCHPOINTER_H
2021-01-10 13:23:43 +01:00
#include "common/config.h"
template <class T>
class SearchPointer
{
public:
SearchPointer(const T *ptr) : _ptr(ptr) {}
const T *data() const {return _ptr;}
bool operator==(const SearchPointer<T> &other) const
{return *data() == *(other.data());}
private:
const T *_ptr;
};
template <class T>
2021-01-10 13:23:43 +01:00
inline HASH_T qHash(const SearchPointer<T> &t)
{
return ::qHash(*(t.data()));
}
#endif // SEARCHPOINTER_H