Yet more cleanup, it builds again now.

This commit is contained in:
Adam Ierymenko 2019-08-21 14:36:56 -07:00
parent 0b5472f9fb
commit 95a6fce2b4
No known key found for this signature in database
GPG key ID: 1657198823E52A61
8 changed files with 92 additions and 111 deletions

View file

@ -46,6 +46,7 @@
#include "InetAddress.hpp"
#include "Hashtable.hpp"
#include "Root.hpp"
#include "SharedPtr.hpp"
namespace ZeroTier {
@ -246,13 +247,13 @@ public:
* @tparam F function or function object type
*/
template<typename F>
inline void eachRoot(F f) const
inline void eachRoot(F f)
{
Mutex::Lock l(_roots_m);
SharedPtr<Peer> rp;
for(std::vector<Root>::const_iterator i(_roots.begin());i!=_roots.end();++i) {
{
SharedPtr::Lock l2(_peers_m);
Mutex::Lock l2(_peers_m);
const SharedPtr<Peer> *const ap = _peers.get(i->address());
if (ap) {
rp = *ap;