mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-20 05:44:23 +02:00
Project structure refactoring
This commit is contained in:
24
src/GUI/searchpointer.h
Normal file
24
src/GUI/searchpointer.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef SEARCHPOINTER_H
|
||||
#define SEARCHPOINTER_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>
|
||||
inline uint qHash(const SearchPointer<T> &t)
|
||||
{
|
||||
return ::qHash(*(t.data()));
|
||||
}
|
||||
|
||||
#endif // SEARCHPOINTER_H
|
Reference in New Issue
Block a user