mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
Fix namespace issues std:: template specialization
This commit is contained in:
parent
42d21e4dc1
commit
29d26a1f9a
2 changed files with 11 additions and 7 deletions
|
@ -34,6 +34,8 @@ using ReceivedAssetCallback = std::function<void(bool responseReceived, AssetSer
|
|||
using GetInfoCallback = std::function<void(bool responseReceived, AssetServerError serverError, AssetInfo info)>;
|
||||
using UploadResultCallback = std::function<void(bool responseReceived, AssetServerError serverError, const QString& hash)>;
|
||||
|
||||
|
||||
|
||||
class AssetClient : public QObject, public Dependency {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
@ -88,13 +88,15 @@ private:
|
|||
typedef QSharedPointer<Node> SharedNodePointer;
|
||||
Q_DECLARE_METATYPE(SharedNodePointer)
|
||||
|
||||
template<>
|
||||
struct std::hash<SharedNodePointer> {
|
||||
std::size_t operator()(const SharedNodePointer& p) const {
|
||||
// Return the hash of the pointer
|
||||
return std::hash<Node*>()(p.data());
|
||||
}
|
||||
};
|
||||
namespace std {
|
||||
template<>
|
||||
struct hash<SharedNodePointer> {
|
||||
size_t operator()(const SharedNodePointer& p) const {
|
||||
// Return the hash of the pointer
|
||||
return hash<Node*>()(p.data());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
QDebug operator<<(QDebug debug, const Node& node);
|
||||
|
||||
|
|
Loading…
Reference in a new issue