mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:13:29 +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 GetInfoCallback = std::function<void(bool responseReceived, AssetServerError serverError, AssetInfo info)>;
|
||||||
using UploadResultCallback = std::function<void(bool responseReceived, AssetServerError serverError, const QString& hash)>;
|
using UploadResultCallback = std::function<void(bool responseReceived, AssetServerError serverError, const QString& hash)>;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class AssetClient : public QObject, public Dependency {
|
class AssetClient : public QObject, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -88,13 +88,15 @@ private:
|
||||||
typedef QSharedPointer<Node> SharedNodePointer;
|
typedef QSharedPointer<Node> SharedNodePointer;
|
||||||
Q_DECLARE_METATYPE(SharedNodePointer)
|
Q_DECLARE_METATYPE(SharedNodePointer)
|
||||||
|
|
||||||
template<>
|
namespace std {
|
||||||
struct std::hash<SharedNodePointer> {
|
template<>
|
||||||
std::size_t operator()(const SharedNodePointer& p) const {
|
struct hash<SharedNodePointer> {
|
||||||
// Return the hash of the pointer
|
size_t operator()(const SharedNodePointer& p) const {
|
||||||
return std::hash<Node*>()(p.data());
|
// Return the hash of the pointer
|
||||||
}
|
return hash<Node*>()(p.data());
|
||||||
};
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
QDebug operator<<(QDebug debug, const Node& node);
|
QDebug operator<<(QDebug debug, const Node& node);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue