diff --git a/include/llarp/net.hpp b/include/llarp/net.hpp index 5ab08663f..c7df1a5dc 100644 --- a/include/llarp/net.hpp +++ b/include/llarp/net.hpp @@ -1,12 +1,13 @@ #ifndef LLARP_NET_HPP #define LLARP_NET_HPP -#include -#include -#include +#include #include "logger.hpp" #include "mem.hpp" -#include +#include #include +#include + +#include #include #include // for itoa diff --git a/include/llarp/net_addr.hpp b/include/llarp/net_addr.hpp index 65b693cf2..244914a14 100644 --- a/include/llarp/net_addr.hpp +++ b/include/llarp/net_addr.hpp @@ -1,11 +1,11 @@ #ifndef LLARP_NET_ADDR_HPP #define LLARP_NET_ADDR_HPP -#include +#include #include -#include +#include #include -#include +#include namespace llarp { diff --git a/include/llarp/router_contact.hpp b/include/llarp/router_contact.hpp index 05efd7b51..0574daf35 100644 --- a/include/llarp/router_contact.hpp +++ b/include/llarp/router_contact.hpp @@ -1,8 +1,9 @@ #ifndef LLARP_RC_HPP #define LLARP_RC_HPP -#include -#include +#include + #include +#include #include #include diff --git a/llarp/address_info.cpp b/llarp/address_info.cpp index f939a1f83..b09780f56 100644 --- a/llarp/address_info.cpp +++ b/llarp/address_info.cpp @@ -1,4 +1,4 @@ -#include +#include #ifndef _WIN32 #include #endif @@ -25,17 +25,17 @@ namespace llarp } bool - AddressInfo::operator==(const AddressInfo &other) const + operator==(const AddressInfo& lhs, const AddressInfo& rhs) { // we don't care about rank - return pubkey == other.pubkey && port == other.port - && dialect == other.dialect && ip == other.ip; + return lhs.pubkey == rhs.pubkey && lhs.port == rhs.port + && lhs.dialect == rhs.dialect && lhs.ip == rhs.ip; } bool - AddressInfo::operator<(const AddressInfo &other) const + operator<(const AddressInfo& lhs, const AddressInfo& rhs) { - return rank < other.rank || ip < other.ip || port < other.port; + return lhs.rank < rhs.rank || lhs.ip < rhs.ip || lhs.port < rhs.port; } bool diff --git a/include/llarp/address_info.hpp b/llarp/address_info.hpp similarity index 92% rename from include/llarp/address_info.hpp rename to llarp/address_info.hpp index 1d229ec9c..796428414 100644 --- a/include/llarp/address_info.hpp +++ b/llarp/address_info.hpp @@ -48,12 +48,6 @@ namespace llarp AddressInfo& operator=(const AddressInfo& other); - bool - operator==(const AddressInfo& other) const; - - bool - operator<(const AddressInfo& other) const; - bool BEncode(llarp_buffer_t* buf) const override; @@ -84,6 +78,13 @@ namespace llarp }; }; + bool + operator==(const AddressInfo& lhs, const AddressInfo& rhs); + + bool + operator<(const AddressInfo& lhs, const AddressInfo& rhs); + + } // namespace llarp #endif