From 63a117bf9310a846581c5f392a792e6f63c620e2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 31 Aug 2020 08:28:13 +0200 Subject: [PATCH] And another boost/C++11 fix This fixes Undefined symbols: "ArdourSurface::hash_value(ArdourSurface::NodeState const&)", referenced from: boost::hash::operator()(ArdourSurface::NodeState const&) constin client.cc.1.o boost::hash::operator()(ArdourSurface::NodeState const&) constin server.cc.1.o --- libs/surfaces/websockets/client.h | 6 +++--- libs/surfaces/websockets/state.cc | 7 +++++++ libs/surfaces/websockets/state.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libs/surfaces/websockets/client.h b/libs/surfaces/websockets/client.h index 92e0526f75..b49008a6b8 100644 --- a/libs/surfaces/websockets/client.h +++ b/libs/surfaces/websockets/client.h @@ -19,7 +19,7 @@ #ifndef _ardour_surface_websockets_client_h_ #define _ardour_surface_websockets_client_h_ -#include +#include #include #include "message.h" @@ -56,8 +56,8 @@ public: private: Client _wsi; - typedef boost::unordered_set ClientState; - ClientState _state; + typedef std::set ClientState; + ClientState _state; ClientOutputBuffer _output_buf; }; diff --git a/libs/surfaces/websockets/state.cc b/libs/surfaces/websockets/state.cc index 5655f9af35..5651dc702f 100644 --- a/libs/surfaces/websockets/state.cc +++ b/libs/surfaces/websockets/state.cc @@ -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) { diff --git a/libs/surfaces/websockets/state.h b/libs/surfaces/websockets/state.h index 0ffb1a4212..a7e9689f9f 100644 --- a/libs/surfaces/websockets/state.h +++ b/libs/surfaces/websockets/state.h @@ -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;