And another boost/C++11 fix

This fixes Undefined symbols:
"ArdourSurface::hash_value(ArdourSurface::NodeState const&)", referenced from:
  boost::hash<ArdourSurface::NodeState>::operator()(ArdourSurface::NodeState const&) constin client.cc.1.o
  boost::hash<ArdourSurface::NodeState>::operator()(ArdourSurface::NodeState const&) constin server.cc.1.o
This commit is contained in:
Robin Gareus 2020-08-31 08:28:13 +02:00
parent a9c2350e87
commit 63a117bf93
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 11 additions and 3 deletions

View file

@ -19,7 +19,7 @@
#ifndef _ardour_surface_websockets_client_h_ #ifndef _ardour_surface_websockets_client_h_
#define _ardour_surface_websockets_client_h_ #define _ardour_surface_websockets_client_h_
#include <boost/unordered_set.hpp> #include <set>
#include <list> #include <list>
#include "message.h" #include "message.h"
@ -56,8 +56,8 @@ public:
private: private:
Client _wsi; Client _wsi;
typedef boost::unordered_set<NodeState> ClientState; typedef std::set<NodeState> ClientState;
ClientState _state; ClientState _state;
ClientOutputBuffer _output_buf; ClientOutputBuffer _output_buf;
}; };

View file

@ -115,6 +115,13 @@ NodeState::operator== (const NodeState& other) const
return node_addr_hash () == other.node_addr_hash (); return node_addr_hash () == other.node_addr_hash ();
} }
bool
NodeState::operator< (const NodeState& other) const
{
return node_addr_hash () < other.node_addr_hash ();
}
std::size_t std::size_t
hash_value (const NodeState& state) hash_value (const NodeState& state)
{ {

View file

@ -76,6 +76,7 @@ public:
std::size_t node_addr_hash () const; std::size_t node_addr_hash () const;
bool operator== (const NodeState& other) const; bool operator== (const NodeState& other) const;
bool operator< (const NodeState& other) const;
private: private:
std::string _node; std::string _node;