diff --git a/src/ripple_app/peers/Peers.cpp b/src/ripple_app/peers/Peers.cpp index 0702d82f4..c6b2521a2 100644 --- a/src/ripple_app/peers/Peers.cpp +++ b/src/ripple_app/peers/Peers.cpp @@ -25,6 +25,24 @@ template <> char const* LogPartition::getPartitionName () { retu class NameResolverLog; template <> char const* LogPartition::getPartitionName () { return "NameResolver"; } +/** Calls a function during static initialization. */ +struct static_call +{ + // Function must be callable as + // void f (void) const + // + template + static_call (Function const& f) + { + f (); + } +}; + +static static_call init_PeerFinderLog (&LogPartition::get ); +static static_call init_NameResolverLog (&LogPartition::get ); + +//------------------------------------------------------------------------------ + class PeersImp : public Peers , public Stoppable