13
0

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
Signed by: rgareus
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_
#define _ardour_surface_websockets_client_h_
#include <boost/unordered_set.hpp>
#include <set>
#include <list>
#include "message.h"
@ -56,8 +56,8 @@ public:
private:
Client _wsi;
typedef boost::unordered_set<NodeState> ClientState;
ClientState _state;
typedef std::set<NodeState> ClientState;
ClientState _state;
ClientOutputBuffer _output_buf;
};

View File

@ -115,6 +115,13 @@ NodeState::operator== (const NodeState& other) const
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
hash_value (const NodeState& state)
{

View File

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