From 7caa87862ee8eaf3c93609d1f7d31bada3517361 Mon Sep 17 00:00:00 2001 From: Thomas Winget Date: Tue, 9 Mar 2021 17:24:35 -0500 Subject: [PATCH] standardize include format and pragma once All #ifndef guards on headers have been removed, I think, in favor of #pragma once Headers are now included as `#include "filename"` if the included file resides in the same directory as the file including it, or any subdirectory therein. Otherwise they are included as `#include ` The above does not include system/os headers. --- daemon/lokinet-vpn.cpp | 2 +- daemon/lokinetctl.cpp | 8 +- daemon/main.cpp | 14 ++-- jni/lokinet_config.cpp | 2 +- jni/lokinet_daemon.cpp | 2 +- jni/lokinet_jni_common.hpp | 5 +- jni/lokinet_jni_vpnio.hpp | 5 +- jni/lokinet_vpn.cpp | 6 +- llarp/android/ifaddrs.c | 2 +- llarp/bootstrap.cpp | 4 +- llarp/bootstrap.hpp | 7 +- llarp/config/config.cpp | 28 +++---- llarp/config/config.hpp | 35 ++++----- llarp/config/definition.cpp | 4 +- llarp/config/definition.hpp | 4 +- llarp/config/ini.cpp | 6 +- llarp/config/ini.hpp | 7 +- llarp/config/key_manager.cpp | 10 +-- llarp/config/key_manager.hpp | 11 +-- llarp/consensus/table.cpp | 4 +- llarp/consensus/table.hpp | 7 +- llarp/constants/defaults.hpp | 5 +- llarp/constants/files.hpp | 2 +- llarp/constants/link_layer.hpp | 8 +- llarp/constants/path.hpp | 9 +-- llarp/constants/proto.hpp | 5 +- llarp/context.cpp | 24 +++--- llarp/crypto/constants.hpp | 5 +- llarp/crypto/crypto.cpp | 2 +- llarp/crypto/crypto.hpp | 11 +-- llarp/crypto/crypto_libsodium.cpp | 8 +- llarp/crypto/crypto_libsodium.hpp | 7 +- llarp/crypto/encrypted.hpp | 15 ++-- llarp/crypto/encrypted_frame.cpp | 8 +- llarp/crypto/encrypted_frame.hpp | 13 ++-- llarp/crypto/types.cpp | 6 +- llarp/crypto/types.hpp | 15 ++-- llarp/dht/bucket.hpp | 10 +-- llarp/dht/context.cpp | 46 ++++++------ llarp/dht/context.hpp | 24 +++--- llarp/dht/dht.cpp | 6 +- llarp/dht/dht.h | 11 +-- llarp/dht/explorenetworkjob.cpp | 12 +-- llarp/dht/explorenetworkjob.hpp | 4 +- llarp/dht/kademlia.hpp | 8 +- llarp/dht/key.hpp | 9 +-- llarp/dht/localrouterlookup.cpp | 14 ++-- llarp/dht/localrouterlookup.hpp | 8 +- llarp/dht/localserviceaddresslookup.cpp | 14 ++-- llarp/dht/localserviceaddresslookup.hpp | 4 +- llarp/dht/localtaglookup.cpp | 12 +-- llarp/dht/localtaglookup.hpp | 2 +- llarp/dht/message.cpp | 18 ++--- llarp/dht/message.hpp | 13 ++-- llarp/dht/messages/consensus.hpp | 7 +- llarp/dht/messages/findintro.cpp | 12 +-- llarp/dht/messages/findintro.hpp | 12 ++- llarp/dht/messages/findname.cpp | 14 ++-- llarp/dht/messages/findname.hpp | 2 +- llarp/dht/messages/findrouter.cpp | 16 ++-- llarp/dht/messages/findrouter.hpp | 6 +- llarp/dht/messages/gotintro.cpp | 14 ++-- llarp/dht/messages/gotintro.hpp | 10 +-- llarp/dht/messages/gotname.cpp | 8 +- llarp/dht/messages/gotname.hpp | 4 +- llarp/dht/messages/gotrouter.cpp | 12 +-- llarp/dht/messages/gotrouter.hpp | 12 ++- llarp/dht/messages/pubintro.cpp | 16 ++-- llarp/dht/messages/pubintro.hpp | 8 +- llarp/dht/node.hpp | 11 +-- llarp/dht/publishservicejob.cpp | 14 ++-- llarp/dht/publishservicejob.hpp | 8 +- llarp/dht/recursiverouterlookup.cpp | 12 +-- llarp/dht/recursiverouterlookup.hpp | 6 +- llarp/dht/serviceaddresslookup.cpp | 8 +- llarp/dht/serviceaddresslookup.hpp | 8 +- llarp/dht/taglookup.cpp | 6 +- llarp/dht/taglookup.hpp | 6 +- llarp/dht/tx.hpp | 8 +- llarp/dht/txholder.hpp | 8 +- llarp/dht/txowner.hpp | 9 +-- llarp/dns/dns.hpp | 5 +- llarp/dns/message.cpp | 18 ++--- llarp/dns/message.hpp | 11 +-- llarp/dns/name.cpp | 8 +- llarp/dns/name.hpp | 9 +-- llarp/dns/query.hpp | 5 +- llarp/dns/question.cpp | 8 +- llarp/dns/question.hpp | 11 +-- llarp/dns/rr.cpp | 10 +-- llarp/dns/rr.hpp | 11 +-- llarp/dns/serialize.cpp | 4 +- llarp/dns/serialize.hpp | 7 +- llarp/dns/server.cpp | 8 +- llarp/dns/server.hpp | 13 ++-- llarp/dns/srv_data.cpp | 6 +- llarp/dns/srv_data.hpp | 4 +- llarp/dns/string.hpp | 5 +- llarp/dns/unbound_resolver.cpp | 6 +- llarp/dns/unbound_resolver.hpp | 4 +- llarp/ev/ev.cpp | 8 +- llarp/ev/ev.hpp | 12 ++- llarp/ev/ev_libuv.cpp | 8 +- llarp/ev/ev_libuv.hpp | 11 +-- llarp/ev/vpn.hpp | 4 +- llarp/ev/vpnio.cpp | 4 +- llarp/ev/vpnio.hpp | 9 +-- llarp/exit/context.cpp | 2 +- llarp/exit/context.hpp | 9 +-- llarp/exit/endpoint.cpp | 8 +- llarp/exit/endpoint.hpp | 13 ++-- llarp/exit/exit_messages.cpp | 6 +- llarp/exit/exit_messages.hpp | 11 +-- llarp/exit/policy.cpp | 2 +- llarp/exit/policy.hpp | 7 +- llarp/exit/session.cpp | 16 ++-- llarp/exit/session.hpp | 15 ++-- llarp/handlers/exit.cpp | 16 ++-- llarp/handlers/exit.hpp | 10 +-- llarp/handlers/null.hpp | 7 +- llarp/handlers/tun.cpp | 36 ++++----- llarp/handlers/tun.hpp | 27 +++---- llarp/hook/ihook.hpp | 5 +- llarp/hook/shell.cpp | 2 +- llarp/hook/shell.hpp | 4 +- llarp/iwp/iwp.cpp | 6 +- llarp/iwp/iwp.hpp | 11 +-- llarp/iwp/linklayer.cpp | 6 +- llarp/iwp/linklayer.hpp | 19 ++--- llarp/iwp/message_buffer.cpp | 6 +- llarp/iwp/message_buffer.hpp | 15 ++-- llarp/iwp/session.cpp | 8 +- llarp/iwp/session.hpp | 15 ++-- llarp/link/factory.cpp | 4 +- llarp/link/factory.hpp | 9 +-- llarp/link/i_link_manager.hpp | 11 +-- llarp/link/link_manager.cpp | 6 +- llarp/link/link_manager.hpp | 11 +-- llarp/link/server.cpp | 12 +-- llarp/link/server.hpp | 23 +++--- llarp/link/session.cpp | 2 +- llarp/link/session.hpp | 15 ++-- llarp/linux/netns.cpp | 4 +- llarp/linux/netns.hpp | 4 +- llarp/messages/dht_immediate.cpp | 4 +- llarp/messages/dht_immediate.hpp | 9 +-- llarp/messages/discard.hpp | 13 ++-- llarp/messages/link_intro.cpp | 12 +-- llarp/messages/link_intro.hpp | 11 +-- llarp/messages/link_message.hpp | 13 ++-- llarp/messages/link_message_parser.cpp | 22 +++--- llarp/messages/link_message_parser.hpp | 8 +- llarp/messages/relay.cpp | 8 +- llarp/messages/relay.hpp | 13 ++-- llarp/messages/relay_commit.cpp | 30 ++++---- llarp/messages/relay_commit.hpp | 15 ++-- llarp/messages/relay_status.cpp | 24 +++--- llarp/messages/relay_status.hpp | 15 ++-- llarp/net/address_info.cpp | 10 +-- llarp/net/address_info.hpp | 15 ++-- llarp/net/exit_info.cpp | 10 +-- llarp/net/exit_info.hpp | 11 +-- llarp/net/ip.cpp | 2 +- llarp/net/ip.hpp | 2 +- llarp/net/ip_address.cpp | 4 +- llarp/net/ip_address.hpp | 4 +- llarp/net/ip_packet.cpp | 10 +-- llarp/net/ip_packet.hpp | 15 ++-- llarp/net/ip_range.cpp | 2 +- llarp/net/ip_range.hpp | 8 +- llarp/net/ip_range_map.hpp | 9 +-- llarp/net/net.cpp | 16 ++-- llarp/net/net.h | 5 +- llarp/net/net.hpp | 23 +++--- llarp/net/net_bits.hpp | 2 +- llarp/net/net_if.hpp | 5 +- llarp/net/net_int.cpp | 4 +- llarp/net/net_int.hpp | 9 +-- llarp/net/route.cpp | 14 ++-- llarp/net/sock_addr.cpp | 14 ++-- llarp/net/sock_addr.hpp | 2 +- llarp/nodedb.cpp | 22 +++--- llarp/nodedb.hpp | 22 +++--- llarp/path/ihophandler.cpp | 4 +- llarp/path/ihophandler.hpp | 16 ++-- llarp/path/path.cpp | 34 ++++----- llarp/path/path.hpp | 39 +++++----- llarp/path/path_context.cpp | 10 +-- llarp/path/path_context.hpp | 29 ++++--- llarp/path/path_types.hpp | 9 +-- llarp/path/pathbuilder.cpp | 20 ++--- llarp/path/pathbuilder.hpp | 8 +- llarp/path/pathset.cpp | 10 +-- llarp/path/pathset.hpp | 19 ++--- llarp/path/transit_hop.cpp | 34 ++++----- llarp/path/transit_hop.hpp | 19 ++--- llarp/peerstats/orm.hpp | 2 +- llarp/peerstats/peer_db.cpp | 8 +- llarp/peerstats/peer_db.hpp | 12 +-- llarp/peerstats/types.cpp | 4 +- llarp/peerstats/types.hpp | 6 +- llarp/pow.cpp | 6 +- llarp/pow.hpp | 9 +-- llarp/profiling.cpp | 4 +- llarp/profiling.hpp | 15 ++-- llarp/router/abstractrouter.hpp | 25 +++---- llarp/router/i_gossiper.hpp | 7 +- llarp/router/i_outbound_message_handler.hpp | 7 +- llarp/router/i_outbound_session_maker.hpp | 9 +-- llarp/router/i_rc_lookup_handler.hpp | 9 +-- llarp/router/outbound_message_handler.cpp | 18 ++--- llarp/router/outbound_message_handler.hpp | 15 ++-- llarp/router/outbound_session_maker.cpp | 26 +++---- llarp/router/outbound_session_maker.hpp | 13 ++-- llarp/router/rc_gossiper.cpp | 12 +-- llarp/router/rc_gossiper.hpp | 15 ++-- llarp/router/rc_lookup_handler.cpp | 24 +++--- llarp/router/rc_lookup_handler.hpp | 9 +-- llarp/router/route_poker.cpp | 8 +- llarp/router/route_poker.hpp | 2 +- llarp/router/router.cpp | 52 ++++++------- llarp/router/router.hpp | 75 +++++++++---------- llarp/router_contact.cpp | 24 +++--- llarp/router_contact.hpp | 23 +++--- llarp/router_id.cpp | 2 +- llarp/router_id.hpp | 8 +- llarp/router_version.cpp | 6 +- llarp/router_version.hpp | 11 +-- llarp/routing/dht_message.cpp | 6 +- llarp/routing/dht_message.hpp | 9 +-- llarp/routing/handler.hpp | 5 +- llarp/routing/message.hpp | 13 ++-- llarp/routing/message_parser.cpp | 20 ++--- llarp/routing/message_parser.hpp | 8 +- llarp/routing/path_confirm_message.cpp | 8 +- llarp/routing/path_confirm_message.hpp | 7 +- llarp/routing/path_latency_message.cpp | 6 +- llarp/routing/path_latency_message.hpp | 7 +- llarp/routing/path_transfer_message.cpp | 6 +- llarp/routing/path_transfer_message.hpp | 13 ++-- llarp/routing/transfer_traffic_message.cpp | 8 +- llarp/routing/transfer_traffic_message.hpp | 9 +-- llarp/rpc/endpoint_rpc.cpp | 2 +- llarp/rpc/endpoint_rpc.hpp | 2 +- llarp/rpc/lokid_rpc_client.cpp | 8 +- llarp/rpc/lokid_rpc_client.hpp | 8 +- llarp/rpc/rpc_server.cpp | 18 ++--- llarp/service/address.cpp | 4 +- llarp/service/address.hpp | 11 +-- llarp/service/async_key_exchange.cpp | 8 +- llarp/service/async_key_exchange.hpp | 11 +-- llarp/service/auth.hpp | 2 +- llarp/service/context.cpp | 12 +-- llarp/service/context.hpp | 12 ++- llarp/service/endpoint.cpp | 54 ++++++------- llarp/service/endpoint.hpp | 45 ++++++----- llarp/service/endpoint_state.cpp | 12 +-- llarp/service/endpoint_state.hpp | 27 +++---- llarp/service/endpoint_types.hpp | 15 ++-- llarp/service/endpoint_util.cpp | 10 +-- llarp/service/endpoint_util.hpp | 7 +- llarp/service/handler.hpp | 13 ++-- .../service/hidden_service_address_lookup.cpp | 6 +- .../service/hidden_service_address_lookup.hpp | 11 +-- llarp/service/identity.cpp | 6 +- llarp/service/identity.hpp | 19 ++--- llarp/service/info.cpp | 8 +- llarp/service/info.hpp | 13 ++-- llarp/service/intro.cpp | 2 +- llarp/service/intro.hpp | 13 ++-- llarp/service/intro_set.cpp | 6 +- llarp/service/intro_set.hpp | 25 +++---- llarp/service/lookup.cpp | 8 +- llarp/service/lookup.hpp | 11 +-- llarp/service/name.cpp | 6 +- llarp/service/name.hpp | 4 +- llarp/service/outbound_context.cpp | 18 ++--- llarp/service/outbound_context.hpp | 10 +-- llarp/service/pendingbuffer.hpp | 9 +-- llarp/service/protocol.cpp | 16 ++-- llarp/service/protocol.hpp | 31 ++++---- llarp/service/router_lookup_job.cpp | 4 +- llarp/service/router_lookup_job.hpp | 6 +- llarp/service/sendcontext.cpp | 8 +- llarp/service/sendcontext.hpp | 19 ++--- llarp/service/session.cpp | 2 +- llarp/service/session.hpp | 17 ++--- llarp/service/tag.cpp | 2 +- llarp/service/tag.hpp | 11 +-- llarp/service/vanity.hpp | 2 +- llarp/simulation/sim_context.cpp | 2 +- llarp/simulation/sim_context.hpp | 4 +- llarp/tooling/dht_event.hpp | 6 +- llarp/tooling/hive_context.cpp | 4 +- llarp/tooling/hive_context.hpp | 2 +- llarp/tooling/hive_router.cpp | 4 +- llarp/tooling/hive_router.hpp | 2 +- llarp/tooling/path_event.hpp | 6 +- llarp/tooling/rc_event.hpp | 4 +- llarp/tooling/router_event.hpp | 2 +- llarp/tooling/router_hive.cpp | 10 +-- llarp/tooling/router_hive.hpp | 6 +- llarp/util/aligned.hpp | 13 ++-- llarp/util/bencode.cpp | 4 +- llarp/util/bencode.h | 11 +-- llarp/util/bencode.hpp | 15 ++-- llarp/util/bits.hpp | 9 +-- llarp/util/buffer.cpp | 4 +- llarp/util/buffer.hpp | 11 +-- llarp/util/codel.hpp | 13 ++-- llarp/util/common.hpp | 4 +- llarp/util/compare_ptr.hpp | 5 +- llarp/util/copy_or_nullptr.hpp | 5 +- llarp/util/decaying_hashset.hpp | 7 +- llarp/util/decaying_hashtable.hpp | 2 +- llarp/util/endian.hpp | 5 +- llarp/util/fs.cpp | 4 +- llarp/util/fs.hpp | 4 +- llarp/util/json.cpp | 2 +- llarp/util/json.hpp | 5 +- llarp/util/logging/android_logger.cpp | 4 +- llarp/util/logging/android_logger.hpp | 7 +- llarp/util/logging/file_logger.cpp | 6 +- llarp/util/logging/file_logger.hpp | 11 +-- llarp/util/logging/json_logger.cpp | 4 +- llarp/util/logging/json_logger.hpp | 2 +- llarp/util/logging/logger.cpp | 16 ++-- llarp/util/logging/logger.hpp | 11 +-- llarp/util/logging/logger_internal.cpp | 2 +- llarp/util/logging/logger_internal.hpp | 9 +-- llarp/util/logging/logger_syslog.hpp | 6 +- llarp/util/logging/loglevel.cpp | 2 +- llarp/util/logging/loglevel.hpp | 5 +- llarp/util/logging/logstream.hpp | 8 +- llarp/util/logging/ostream_logger.cpp | 4 +- llarp/util/logging/ostream_logger.hpp | 7 +- llarp/util/logging/syslog_logger.cpp | 4 +- llarp/util/logging/win32_logger.cpp | 4 +- llarp/util/logging/win32_logger.hpp | 6 +- llarp/util/lokinet_init.c | 2 +- llarp/util/lokinet_init.h | 4 +- llarp/util/mem.cpp | 2 +- llarp/util/mem.h | 5 +- llarp/util/mem.hpp | 9 +-- llarp/util/meta/traits.hpp | 5 +- llarp/util/printer.cpp | 2 +- llarp/util/printer.hpp | 7 +- llarp/util/status.hpp | 5 +- llarp/util/str.cpp | 2 +- llarp/util/str.hpp | 5 +- llarp/util/thread/queue.hpp | 9 +-- llarp/util/thread/queue_manager.cpp | 4 +- llarp/util/thread/queue_manager.hpp | 4 +- llarp/util/thread/threading.cpp | 4 +- llarp/util/thread/threading.hpp | 7 +- llarp/util/time.cpp | 4 +- llarp/util/time.hpp | 7 +- llarp/util/types.hpp | 5 +- llarp/vpn/android.hpp | 4 +- llarp/vpn/apple.hpp | 4 +- llarp/vpn/linux.hpp | 4 +- llarp/vpn/packet_router.cpp | 2 +- llarp/vpn/packet_router.hpp | 4 +- llarp/vpn/platform.cpp | 8 +- llarp/vpn/win32.hpp | 4 +- llarp/win32/win32_inet.c | 2 +- llarp/win32/win32_intrnl.c | 2 +- pybind/common.hpp | 2 +- pybind/llarp/config.cpp | 4 +- pybind/llarp/context.cpp | 8 +- pybind/llarp/crypto/types.cpp | 4 +- pybind/llarp/dht/dht_types.cpp | 4 +- pybind/llarp/handlers/pyhandler.cpp | 2 +- pybind/llarp/handlers/pyhandler.hpp | 10 +-- pybind/llarp/logger.cpp | 4 +- pybind/llarp/path/path_hop_config.cpp | 4 +- pybind/llarp/path/path_types.cpp | 4 +- pybind/llarp/peerstats.cpp | 8 +- pybind/llarp/router.cpp | 6 +- pybind/llarp/router_contact.cpp | 6 +- pybind/llarp/router_id.cpp | 4 +- pybind/llarp/service/address.cpp | 6 +- pybind/llarp/tooling/peer_stats_event.hpp | 2 +- pybind/llarp/tooling/router_event.cpp | 18 ++--- pybind/llarp/tooling/router_hive.cpp | 12 +-- pybind/module.cpp | 2 +- 386 files changed, 1650 insertions(+), 2112 deletions(-) diff --git a/daemon/lokinet-vpn.cpp b/daemon/lokinet-vpn.cpp index 596faf86e..dfa3c785d 100644 --- a/daemon/lokinet-vpn.cpp +++ b/daemon/lokinet-vpn.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #ifdef _WIN32 // add the unholy windows headers for iphlpapi diff --git a/daemon/lokinetctl.cpp b/daemon/lokinetctl.cpp index bbe2e9899..8eaf099aa 100644 --- a/daemon/lokinetctl.cpp +++ b/daemon/lokinetctl.cpp @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/daemon/main.cpp b/daemon/main.cpp index 635b34b5a..66eb19296 100644 --- a/daemon/main.cpp +++ b/daemon/main.cpp @@ -1,11 +1,11 @@ -#include // for ensure_config -#include +#include // for ensure_config +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #ifdef _WIN32 #include diff --git a/jni/lokinet_config.cpp b/jni/lokinet_config.cpp index 34fae0fab..5313743c3 100644 --- a/jni/lokinet_config.cpp +++ b/jni/lokinet_config.cpp @@ -1,6 +1,6 @@ #include "network_loki_lokinet_LokinetConfig.h" #include -#include +#include #include "lokinet_jni_common.hpp" extern "C" diff --git a/jni/lokinet_daemon.cpp b/jni/lokinet_daemon.cpp index a13cd638f..8eaf59cf4 100644 --- a/jni/lokinet_daemon.cpp +++ b/jni/lokinet_daemon.cpp @@ -2,7 +2,7 @@ #include "lokinet_jni_common.hpp" #include "lokinet_jni_vpnio.hpp" #include -#include +#include extern "C" { diff --git a/jni/lokinet_jni_common.hpp b/jni/lokinet_jni_common.hpp index 76f1e977b..8eb77069c 100644 --- a/jni/lokinet_jni_common.hpp +++ b/jni/lokinet_jni_common.hpp @@ -1,5 +1,4 @@ -#ifndef LOKINET_JNI_COMMON_HPP -#define LOKINET_JNI_COMMON_HPP +#pragma once #include #include @@ -78,5 +77,3 @@ GetImpl(JNIEnv* env, jobject self) { return FromObjectMember(env, self, "impl"); } - -#endif diff --git a/jni/lokinet_jni_vpnio.hpp b/jni/lokinet_jni_vpnio.hpp index ce9cde065..42e76a114 100644 --- a/jni/lokinet_jni_vpnio.hpp +++ b/jni/lokinet_jni_vpnio.hpp @@ -1,5 +1,4 @@ -#ifndef LOKINET_JNI_VPNIO_HPP -#define LOKINET_JNI_VPNIO_HPP +#pragma once #include #include @@ -143,5 +142,3 @@ struct lokinet_jni_vpnio : public lokinet::VPNIO Tick() override {} }; - -#endif \ No newline at end of file diff --git a/jni/lokinet_vpn.cpp b/jni/lokinet_vpn.cpp index 43adb76cf..ade1fb484 100644 --- a/jni/lokinet_vpn.cpp +++ b/jni/lokinet_vpn.cpp @@ -1,8 +1,8 @@ #include "network_loki_lokinet_LokinetVPN.h" #include "lokinet_jni_vpnio.hpp" #include "lokinet_jni_common.hpp" -#include -#include +#include +#include #include extern "C" @@ -82,4 +82,4 @@ extern "C" }); vpn->info.netmask = GetObjectMemberAsInt(env, info, "netmask"); } -} \ No newline at end of file +} diff --git a/llarp/android/ifaddrs.c b/llarp/android/ifaddrs.c index f0bd83c00..8702feca8 100644 --- a/llarp/android/ifaddrs.c +++ b/llarp/android/ifaddrs.c @@ -22,7 +22,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include +#include "ifaddrs.h" #include #include diff --git a/llarp/bootstrap.cpp b/llarp/bootstrap.cpp index a5fb3ad17..f21f3a025 100644 --- a/llarp/bootstrap.cpp +++ b/llarp/bootstrap.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "bootstrap.hpp" +#include "util/bencode.hpp" namespace llarp { diff --git a/llarp/bootstrap.hpp b/llarp/bootstrap.hpp index affd4bb7e..e9a62d7e9 100644 --- a/llarp/bootstrap.hpp +++ b/llarp/bootstrap.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_BOOTSTRAP_HPP -#define LLARP_BOOTSTRAP_HPP +#pragma once -#include +#include "router_contact.hpp" #include namespace llarp @@ -18,5 +17,3 @@ namespace llarp Clear(); }; } // namespace llarp - -#endif diff --git a/llarp/config/config.cpp b/llarp/config/config.cpp index 93c79a677..6f2010b32 100644 --- a/llarp/config/config.cpp +++ b/llarp/config/config.cpp @@ -1,25 +1,25 @@ #include -#include - -#include -#include -#include -#include -#include -#include +#include "config.hpp" + +#include "ini.hpp" +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include #include #include -#include "constants/version.hpp" +#include namespace llarp { diff --git a/llarp/config/config.hpp b/llarp/config/config.hpp index 7cbf57c78..1ba181123 100644 --- a/llarp/config/config.hpp +++ b/llarp/config/config.hpp @@ -1,22 +1,21 @@ -#ifndef LLARP_CONFIG_HPP -#define LLARP_CONFIG_HPP +#pragma once #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include "ini.hpp" +#include "definition.hpp" +#include +#include +#include +#include +#include +#include +#include + +#include #include #include @@ -276,5 +275,3 @@ namespace llarp ensureConfig(fs::path dataDir, fs::path confFile, bool overwrite, bool asRouter); } // namespace llarp - -#endif diff --git a/llarp/config/definition.cpp b/llarp/config/definition.cpp index 47e3eb06d..217cd77d3 100644 --- a/llarp/config/definition.cpp +++ b/llarp/config/definition.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "definition.hpp" +#include #include #include diff --git a/llarp/config/definition.hpp b/llarp/config/definition.hpp index 1f13f987a..0e3d638b2 100644 --- a/llarp/config/definition.hpp +++ b/llarp/config/definition.hpp @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/llarp/config/ini.cpp b/llarp/config/ini.cpp index b89beaf76..beb4c6c96 100644 --- a/llarp/config/ini.cpp +++ b/llarp/config/ini.cpp @@ -1,7 +1,7 @@ -#include +#include "ini.hpp" -#include -#include +#include +#include #include #include diff --git a/llarp/config/ini.hpp b/llarp/config/ini.hpp index c2031ed38..9fc36567b 100644 --- a/llarp/config/ini.hpp +++ b/llarp/config/ini.hpp @@ -1,5 +1,4 @@ -#ifndef LOKINET_BOOTSERV_CONFIG_HPP -#define LOKINET_BOOTSERV_CONFIG_HPP +#pragma once #include #include @@ -7,7 +6,7 @@ #include #include #include -#include +#include namespace llarp { @@ -59,5 +58,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/config/key_manager.cpp b/llarp/config/key_manager.cpp index 7827e3916..1637c95a7 100644 --- a/llarp/config/key_manager.cpp +++ b/llarp/config/key_manager.cpp @@ -1,10 +1,10 @@ -#include +#include "key_manager.hpp" #include -#include -#include "config/config.hpp" -#include "crypto/crypto.hpp" -#include "crypto/types.hpp" +#include +#include "config.hpp" +#include +#include namespace llarp { diff --git a/llarp/config/key_manager.hpp b/llarp/config/key_manager.hpp index a967ffba3..74e741b70 100644 --- a/llarp/config/key_manager.hpp +++ b/llarp/config/key_manager.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_KEY_MANAGER_HPP -#define LLARP_KEY_MANAGER_HPP +#pragma once #include -#include -#include -#include +#include "config.hpp" +#include +#include namespace llarp { @@ -88,5 +87,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/consensus/table.cpp b/llarp/consensus/table.cpp index 19db1aad5..6645bc97c 100644 --- a/llarp/consensus/table.cpp +++ b/llarp/consensus/table.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "table.hpp" +#include namespace llarp { diff --git a/llarp/consensus/table.hpp b/llarp/consensus/table.hpp index b16f32a84..64327255b 100644 --- a/llarp/consensus/table.hpp +++ b/llarp/consensus/table.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_CONSENSUS_TABLE_HPP -#define LLARP_CONSENSUS_TABLE_HPP +#pragma once -#include +#include #include namespace llarp @@ -16,5 +15,3 @@ namespace llarp }; } // namespace consensus } // namespace llarp - -#endif diff --git a/llarp/constants/defaults.hpp b/llarp/constants/defaults.hpp index fa2b9ff25..884fdf1bf 100644 --- a/llarp/constants/defaults.hpp +++ b/llarp/constants/defaults.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_DEFAULTS_HPP -#define LLARP_DEFAULTS_HPP +#pragma once #ifndef DEFAULT_RESOLVER_US #define DEFAULT_RESOLVER_US "1.1.1.1" @@ -17,5 +16,3 @@ #ifndef DEFAULT_LOKINET_GROUP #define DEFAULT_LOKINET_GROUP "lokinet" #endif - -#endif diff --git a/llarp/constants/files.hpp b/llarp/constants/files.hpp index 8ea075b92..0a1426e1e 100644 --- a/llarp/constants/files.hpp +++ b/llarp/constants/files.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include diff --git a/llarp/constants/link_layer.hpp b/llarp/constants/link_layer.hpp index c1231665e..0f941a8b2 100644 --- a/llarp/constants/link_layer.hpp +++ b/llarp/constants/link_layer.hpp @@ -1,11 +1,9 @@ -#ifndef LLARP_LINK_LAYER_HPP -#define LLARP_LINK_LAYER_HPP -#include -#include +#pragma once +#include +#include #include constexpr size_t MAX_LINK_MSG_SIZE = 8192; static constexpr auto DefaultLinkSessionLifetime = 1min; constexpr size_t MaxSendQueueSize = 1024; -#endif diff --git a/llarp/constants/path.hpp b/llarp/constants/path.hpp index 9d6da0865..512f5610f 100644 --- a/llarp/constants/path.hpp +++ b/llarp/constants/path.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_CONSTANTS_PATH_HPP -#define LLARP_CONSTANTS_PATH_HPP +#pragma once #include #include -#include -#include +#include +#include namespace llarp { @@ -40,5 +39,3 @@ namespace llarp } // namespace path } // namespace llarp - -#endif diff --git a/llarp/constants/proto.hpp b/llarp/constants/proto.hpp index feff1d9dd..fe2bb03ec 100644 --- a/llarp/constants/proto.hpp +++ b/llarp/constants/proto.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_PROTO_HPP -#define LLARP_PROTO_HPP +#pragma once #ifndef LLARP_PROTO_VERSION #define LLARP_PROTO_VERSION (0) @@ -12,5 +11,3 @@ #ifndef LLARP_KEYFILE_VERSION #define LLARP_KEYFILE_VERSION (1) #endif - -#endif diff --git a/llarp/context.cpp b/llarp/context.cpp index 6c521ee26..887b2803c 100644 --- a/llarp/context.cpp +++ b/llarp/context.cpp @@ -1,17 +1,17 @@ #include -#include -#include - -#include -#include -#include -#include -#include +#include "constants/version.hpp" +#include "constants/evloop.hpp" + +#include "config/config.hpp" +#include "crypto/crypto_libsodium.hpp" +#include "dht/context.hpp" +#include "ev/ev.hpp" +#include "ev/vpnio.hpp" #include -#include -#include -#include -#include +#include "nodedb.hpp" +#include "router/router.hpp" +#include "service/context.hpp" +#include "util/logging/logger.hpp" #include #include diff --git a/llarp/crypto/constants.hpp b/llarp/crypto/constants.hpp index b5101f05c..7f8eef90f 100644 --- a/llarp/crypto/constants.hpp +++ b/llarp/crypto/constants.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_CRYPTO_CONSTANTS_HPP -#define LLARP_CRYPTO_CONSTANTS_HPP +#pragma once #include @@ -21,5 +20,3 @@ static constexpr uint32_t PQ_CIPHERTEXTSIZE = crypto_kem_CIPHERTEXTBYTES; static constexpr uint32_t PQ_PUBKEYSIZE = crypto_kem_PUBLICKEYBYTES; static constexpr uint32_t PQ_SECRETKEYSIZE = crypto_kem_SECRETKEYBYTES; static constexpr uint32_t PQ_KEYPAIRSIZE = (PQ_SECRETKEYSIZE + PQ_PUBKEYSIZE); - -#endif diff --git a/llarp/crypto/crypto.cpp b/llarp/crypto/crypto.cpp index c62de5121..011aedc88 100644 --- a/llarp/crypto/crypto.cpp +++ b/llarp/crypto/crypto.cpp @@ -1,4 +1,4 @@ -#include +#include "crypto.hpp" namespace llarp { diff --git a/llarp/crypto/crypto.hpp b/llarp/crypto/crypto.hpp index ad38e85b2..56cc6c60f 100644 --- a/llarp/crypto/crypto.hpp +++ b/llarp/crypto/crypto.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_CRYPTO_HPP -#define LLARP_CRYPTO_HPP +#pragma once -#include -#include +#include "constants.hpp" +#include "types.hpp" -#include +#include #include @@ -176,5 +175,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/crypto/crypto_libsodium.cpp b/llarp/crypto/crypto_libsodium.cpp index 2e89e8934..8a14f66af 100644 --- a/llarp/crypto/crypto_libsodium.cpp +++ b/llarp/crypto/crypto_libsodium.cpp @@ -1,4 +1,4 @@ -#include +#include "crypto_libsodium.hpp" #include #include #include @@ -8,9 +8,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/llarp/crypto/crypto_libsodium.hpp b/llarp/crypto/crypto_libsodium.hpp index 3577d1d1b..f085aee1e 100644 --- a/llarp/crypto/crypto_libsodium.hpp +++ b/llarp/crypto/crypto_libsodium.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_CRYPTO_LIBSODIUM_HPP -#define LLARP_CRYPTO_LIBSODIUM_HPP +#pragma once -#include +#include "crypto.hpp" namespace llarp { @@ -109,5 +108,3 @@ namespace llarp } // namespace sodium } // namespace llarp - -#endif diff --git a/llarp/crypto/encrypted.hpp b/llarp/crypto/encrypted.hpp index baf869467..0dbf77278 100644 --- a/llarp/crypto/encrypted.hpp +++ b/llarp/crypto/encrypted.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_ENCRYPTED_HPP -#define LLARP_ENCRYPTED_HPP +#pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -165,5 +164,3 @@ namespace llarp llarp_buffer_t m_Buffer; }; // namespace llarp } // namespace llarp - -#endif diff --git a/llarp/crypto/encrypted_frame.cpp b/llarp/crypto/encrypted_frame.cpp index 5e4369d5c..79d89bbda 100644 --- a/llarp/crypto/encrypted_frame.cpp +++ b/llarp/crypto/encrypted_frame.cpp @@ -1,8 +1,8 @@ -#include +#include "encrypted_frame.hpp" -#include -#include -#include +#include "crypto.hpp" +#include +#include namespace llarp { diff --git a/llarp/crypto/encrypted_frame.hpp b/llarp/crypto/encrypted_frame.hpp index ba624d68f..d10d799a3 100644 --- a/llarp/crypto/encrypted_frame.hpp +++ b/llarp/crypto/encrypted_frame.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_ENCRYPTED_FRAME_HPP -#define LLARP_ENCRYPTED_FRAME_HPP +#pragma once -#include -#include -#include +#include "encrypted.hpp" +#include "types.hpp" +#include #include -#include +#include namespace llarp { @@ -85,5 +84,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/crypto/types.cpp b/llarp/crypto/types.cpp index f18b660f0..3db017647 100644 --- a/llarp/crypto/types.cpp +++ b/llarp/crypto/types.cpp @@ -1,9 +1,9 @@ -#include +#include "types.hpp" -#include +#include #include -#include +#include #include diff --git a/llarp/crypto/types.hpp b/llarp/crypto/types.hpp index 9ad68ffa7..2c0d3711a 100644 --- a/llarp/crypto/types.hpp +++ b/llarp/crypto/types.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_CRYPTO_TYPES_HPP -#define LLARP_CRYPTO_TYPES_HPP +#pragma once -#include -#include -#include -#include -#include +#include "constants.hpp" +#include +#include +#include +#include #include #include @@ -244,5 +243,3 @@ namespace llarp /// SH(result, body) using shorthash_func = std::function; } // namespace llarp - -#endif diff --git a/llarp/dht/bucket.hpp b/llarp/dht/bucket.hpp index 4c9baf5ae..03232d7d8 100644 --- a/llarp/dht/bucket.hpp +++ b/llarp/dht/bucket.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DHT_BUCKET_HPP -#define LLARP_DHT_BUCKET_HPP +#pragma once -#include -#include -#include +#include "kademlia.hpp" +#include "key.hpp" +#include #include #include @@ -230,4 +229,3 @@ namespace llarp }; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/context.cpp b/llarp/dht/context.cpp index 51b7be7d2..4331734f2 100644 --- a/llarp/dht/context.cpp +++ b/llarp/dht/context.cpp @@ -1,26 +1,26 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "context.hpp" + +#include "explorenetworkjob.hpp" +#include "localrouterlookup.hpp" +#include "localserviceaddresslookup.hpp" +#include "localtaglookup.hpp" +#include +#include +#include +#include +#include "node.hpp" +#include "publishservicejob.hpp" +#include "recursiverouterlookup.hpp" +#include "serviceaddresslookup.hpp" +#include "taglookup.hpp" +#include +#include +#include +#include +#include +#include +#include +#include #include namespace llarp diff --git a/llarp/dht/context.hpp b/llarp/dht/context.hpp index ce88f3935..9d00beec9 100644 --- a/llarp/dht/context.hpp +++ b/llarp/dht/context.hpp @@ -1,18 +1,18 @@ #ifndef LLARP_DHT_CONTEXT #define LLARP_DHT_CONTEXT -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "bucket.hpp" +#include "dht.h" +#include "key.hpp" +#include "message.hpp" +#include +#include "node.hpp" +#include "tx.hpp" +#include "txholder.hpp" +#include "txowner.hpp" +#include +#include +#include #include #include diff --git a/llarp/dht/dht.cpp b/llarp/dht/dht.cpp index 74ed56a61..f12411343 100644 --- a/llarp/dht/dht.cpp +++ b/llarp/dht/dht.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "context.hpp" +#include "dht.h" +#include llarp_dht_context::llarp_dht_context(llarp::AbstractRouter* router) { diff --git a/llarp/dht/dht.h b/llarp/dht/dht.h index 972a5ed54..20ce470c7 100644 --- a/llarp/dht/dht.h +++ b/llarp/dht/dht.h @@ -1,9 +1,8 @@ -#ifndef LLARP_DHT_H_ -#define LLARP_DHT_H_ +#pragma once -#include -#include -#include +#include +#include +#include /** * dht.h @@ -60,5 +59,3 @@ __llarp_dht_remove_peer(struct llarp_dht_context* ctx, const byte_t* id); void llarp_dht_lookup_router(struct llarp_dht_context* ctx, struct llarp_router_lookup_job* job); - -#endif diff --git a/llarp/dht/explorenetworkjob.cpp b/llarp/dht/explorenetworkjob.cpp index e08e24d4f..379f2d4b4 100644 --- a/llarp/dht/explorenetworkjob.cpp +++ b/llarp/dht/explorenetworkjob.cpp @@ -1,12 +1,12 @@ -#include +#include "explorenetworkjob.hpp" -#include -#include -#include +#include "context.hpp" +#include +#include -#include +#include -#include +#include namespace llarp { diff --git a/llarp/dht/explorenetworkjob.hpp b/llarp/dht/explorenetworkjob.hpp index c3312c83a..990c619f8 100644 --- a/llarp/dht/explorenetworkjob.hpp +++ b/llarp/dht/explorenetworkjob.hpp @@ -1,8 +1,8 @@ #ifndef LLARP_DHT_EXPLORENETWORKJOB #define LLARP_DHT_EXPLORENETWORKJOB -#include -#include +#include "tx.hpp" +#include namespace llarp { diff --git a/llarp/dht/kademlia.hpp b/llarp/dht/kademlia.hpp index cc89586fe..af0ca20f0 100644 --- a/llarp/dht/kademlia.hpp +++ b/llarp/dht/kademlia.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_DHT_KADEMLIA_HPP -#define LLARP_DHT_KADEMLIA_HPP +#pragma once -#include -#include +#include "key.hpp" +#include namespace llarp { @@ -29,4 +28,3 @@ namespace llarp }; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/key.hpp b/llarp/dht/key.hpp index 94fd894ef..242c783df 100644 --- a/llarp/dht/key.hpp +++ b/llarp/dht/key.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_DHT_KEY_HPP -#define LLARP_DHT_KEY_HPP +#pragma once -#include -#include +#include +#include #include @@ -75,5 +74,3 @@ namespace llarp }; } // namespace dht } // namespace llarp - -#endif diff --git a/llarp/dht/localrouterlookup.cpp b/llarp/dht/localrouterlookup.cpp index 9e8a5b172..e45c9cf64 100644 --- a/llarp/dht/localrouterlookup.cpp +++ b/llarp/dht/localrouterlookup.cpp @@ -1,12 +1,12 @@ -#include +#include "localrouterlookup.hpp" -#include -#include +#include "context.hpp" +#include -#include -#include -#include -#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/dht/localrouterlookup.hpp b/llarp/dht/localrouterlookup.hpp index 8c103c6bd..f2532b201 100644 --- a/llarp/dht/localrouterlookup.hpp +++ b/llarp/dht/localrouterlookup.hpp @@ -1,11 +1,11 @@ #ifndef LLARP_DHT_LOCALROUTERLOOKUP #define LLARP_DHT_LOCALROUTERLOOKUP -#include +#include "recursiverouterlookup.hpp" -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/dht/localserviceaddresslookup.cpp b/llarp/dht/localserviceaddresslookup.cpp index 02adb1f24..fda3260db 100644 --- a/llarp/dht/localserviceaddresslookup.cpp +++ b/llarp/dht/localserviceaddresslookup.cpp @@ -1,11 +1,11 @@ -#include +#include "localserviceaddresslookup.hpp" -#include -#include -#include -#include -#include -#include +#include "context.hpp" +#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/dht/localserviceaddresslookup.hpp b/llarp/dht/localserviceaddresslookup.hpp index da59ad6cb..c25755566 100644 --- a/llarp/dht/localserviceaddresslookup.hpp +++ b/llarp/dht/localserviceaddresslookup.hpp @@ -1,9 +1,9 @@ #ifndef LLARP_DHT_LOCALSERVICEADDRESSLOOKUP #define LLARP_DHT_LOCALSERVICEADDRESSLOOKUP -#include +#include "serviceaddresslookup.hpp" -#include +#include namespace llarp { diff --git a/llarp/dht/localtaglookup.cpp b/llarp/dht/localtaglookup.cpp index ccb9fcdbc..a4bc88b68 100644 --- a/llarp/dht/localtaglookup.cpp +++ b/llarp/dht/localtaglookup.cpp @@ -1,10 +1,10 @@ -#include +#include "localtaglookup.hpp" -#include -#include -#include -#include -#include +#include "context.hpp" +#include +#include +#include +#include namespace llarp { diff --git a/llarp/dht/localtaglookup.hpp b/llarp/dht/localtaglookup.hpp index d51f72e3d..728487477 100644 --- a/llarp/dht/localtaglookup.hpp +++ b/llarp/dht/localtaglookup.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_DHT_LOOKUPTAGLOOKUP #define LLARP_DHT_LOOKUPTAGLOOKUP -#include +#include "taglookup.hpp" namespace llarp { diff --git a/llarp/dht/message.cpp b/llarp/dht/message.cpp index 5b15caf62..7435cc3cb 100644 --- a/llarp/dht/message.cpp +++ b/llarp/dht/message.cpp @@ -1,14 +1,14 @@ -#include +#include "context.hpp" #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/dht/message.hpp b/llarp/dht/message.hpp index 8e1ca45be..338c98c33 100644 --- a/llarp/dht/message.hpp +++ b/llarp/dht/message.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_DHT_MESSAGE_HPP -#define LLARP_DHT_MESSAGE_HPP +#pragma once -#include -#include -#include -#include +#include "dht.h" +#include "key.hpp" +#include +#include #include @@ -46,5 +45,3 @@ namespace llarp Key_t from, llarp_buffer_t* buf, std::vector& dst, bool relayed = false); } // namespace dht } // namespace llarp - -#endif diff --git a/llarp/dht/messages/consensus.hpp b/llarp/dht/messages/consensus.hpp index 3c17ba1af..f5a431204 100644 --- a/llarp/dht/messages/consensus.hpp +++ b/llarp/dht/messages/consensus.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_DHT_MESSAGES_CONSENSUS_HPP -#define LLARP_DHT_MESSAGES_CONSENSUS_HPP -#include -#include +#pragma once +#include +#include namespace llarp { diff --git a/llarp/dht/messages/findintro.cpp b/llarp/dht/messages/findintro.cpp index eb5a3d5f6..0e21523b7 100644 --- a/llarp/dht/messages/findintro.cpp +++ b/llarp/dht/messages/findintro.cpp @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include -#include +#include +#include "findintro.hpp" +#include "gotintro.hpp" +#include +#include +#include namespace llarp { diff --git a/llarp/dht/messages/findintro.hpp b/llarp/dht/messages/findintro.hpp index 379066b2c..b3571168e 100644 --- a/llarp/dht/messages/findintro.hpp +++ b/llarp/dht/messages/findintro.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_DHT_MESSAGES_FIND_INTRO_HPP -#define LLARP_DHT_MESSAGES_FIND_INTRO_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include namespace llarp { @@ -47,4 +46,3 @@ namespace llarp }; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/messages/findname.cpp b/llarp/dht/messages/findname.cpp index 4eb7cc397..929db0ed7 100644 --- a/llarp/dht/messages/findname.cpp +++ b/llarp/dht/messages/findname.cpp @@ -1,11 +1,11 @@ -#include +#include "findname.hpp" #include -#include -#include -#include -#include -#include -#include +#include +#include "gotname.hpp" +#include +#include +#include +#include namespace llarp::dht { diff --git a/llarp/dht/messages/findname.hpp b/llarp/dht/messages/findname.hpp index 0b9ff6741..de02300ee 100644 --- a/llarp/dht/messages/findname.hpp +++ b/llarp/dht/messages/findname.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace llarp::dht { diff --git a/llarp/dht/messages/findrouter.cpp b/llarp/dht/messages/findrouter.cpp index 800f7c1ae..5fd2b51a5 100644 --- a/llarp/dht/messages/findrouter.cpp +++ b/llarp/dht/messages/findrouter.cpp @@ -1,13 +1,13 @@ -#include +#include "findrouter.hpp" -#include -#include -#include -#include -#include -#include +#include +#include "gotrouter.hpp" +#include +#include +#include +#include -#include +#include namespace llarp { diff --git a/llarp/dht/messages/findrouter.hpp b/llarp/dht/messages/findrouter.hpp index dca4db9ad..9ff4b09a5 100644 --- a/llarp/dht/messages/findrouter.hpp +++ b/llarp/dht/messages/findrouter.hpp @@ -1,6 +1,5 @@ -#ifndef LLARP_DHT_MESSAGES_FIND_ROUTER_HPP -#define LLARP_DHT_MESSAGES_FIND_ROUTER_HPP -#include +#pragma once +#include namespace llarp { @@ -56,4 +55,3 @@ namespace llarp }; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/messages/gotintro.cpp b/llarp/dht/messages/gotintro.cpp index e7405e47f..0480a521a 100644 --- a/llarp/dht/messages/gotintro.cpp +++ b/llarp/dht/messages/gotintro.cpp @@ -1,12 +1,12 @@ -#include +#include "gotintro.hpp" -#include -#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include namespace llarp diff --git a/llarp/dht/messages/gotintro.hpp b/llarp/dht/messages/gotintro.hpp index 25d125135..3e9fda6b0 100644 --- a/llarp/dht/messages/gotintro.hpp +++ b/llarp/dht/messages/gotintro.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DHT_MESSAGES_GOT_INTRO_HPP -#define LLARP_DHT_MESSAGES_GOT_INTRO_HPP +#pragma once -#include -#include -#include +#include +#include +#include #include #include @@ -63,4 +62,3 @@ namespace llarp using GotIntroMessage_constptr = std::shared_ptr; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/messages/gotname.cpp b/llarp/dht/messages/gotname.cpp index 427ac7b12..47efe5854 100644 --- a/llarp/dht/messages/gotname.cpp +++ b/llarp/dht/messages/gotname.cpp @@ -1,8 +1,8 @@ -#include +#include "gotname.hpp" #include -#include -#include -#include +#include +#include +#include namespace llarp::dht { diff --git a/llarp/dht/messages/gotname.hpp b/llarp/dht/messages/gotname.hpp index bbe2272e1..6575e21f5 100644 --- a/llarp/dht/messages/gotname.hpp +++ b/llarp/dht/messages/gotname.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include namespace llarp::dht { diff --git a/llarp/dht/messages/gotrouter.cpp b/llarp/dht/messages/gotrouter.cpp index ce3af059c..4ab90a7d4 100644 --- a/llarp/dht/messages/gotrouter.cpp +++ b/llarp/dht/messages/gotrouter.cpp @@ -1,11 +1,11 @@ -#include -#include +#include +#include "gotrouter.hpp" #include -#include -#include -#include -#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/dht/messages/gotrouter.hpp b/llarp/dht/messages/gotrouter.hpp index be2e3678d..259911313 100644 --- a/llarp/dht/messages/gotrouter.hpp +++ b/llarp/dht/messages/gotrouter.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DHT_MESSAGES_GOT_ROUTER_HPP -#define LLARP_DHT_MESSAGES_GOT_ROUTER_HPP -#include -#include -#include -#include +#pragma once +#include +#include +#include +#include #include #include @@ -67,4 +66,3 @@ namespace llarp using GotRouterMessage_constptr = std::shared_ptr; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/messages/pubintro.cpp b/llarp/dht/messages/pubintro.cpp index 0496505b5..07598f9cc 100644 --- a/llarp/dht/messages/pubintro.cpp +++ b/llarp/dht/messages/pubintro.cpp @@ -1,13 +1,13 @@ -#include +#include "pubintro.hpp" -#include -#include -#include -#include -#include -#include +#include +#include "gotintro.hpp" +#include +#include +#include +#include -#include +#include namespace llarp { diff --git a/llarp/dht/messages/pubintro.hpp b/llarp/dht/messages/pubintro.hpp index 25e622dbb..0f12021f1 100644 --- a/llarp/dht/messages/pubintro.hpp +++ b/llarp/dht/messages/pubintro.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_DHT_MESSAGES_PUB_INTRO_HPP -#define LLARP_DHT_MESSAGES_PUB_INTRO_HPP -#include -#include +#pragma once +#include +#include #include #include @@ -42,4 +41,3 @@ namespace llarp }; } // namespace dht } // namespace llarp -#endif diff --git a/llarp/dht/node.hpp b/llarp/dht/node.hpp index c1bd46194..ce4e124f1 100644 --- a/llarp/dht/node.hpp +++ b/llarp/dht/node.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DHT_NODE_HPP -#define LLARP_DHT_NODE_HPP +#pragma once -#include -#include -#include +#include "key.hpp" +#include +#include #include namespace llarp @@ -66,5 +65,3 @@ namespace llarp }; } // namespace dht } // namespace llarp - -#endif diff --git a/llarp/dht/publishservicejob.cpp b/llarp/dht/publishservicejob.cpp index 2990d4bea..6d138b62c 100644 --- a/llarp/dht/publishservicejob.cpp +++ b/llarp/dht/publishservicejob.cpp @@ -1,11 +1,11 @@ -#include +#include "publishservicejob.hpp" -#include -#include -#include -#include -#include -#include +#include "context.hpp" +#include +#include +#include +#include +#include #include namespace llarp diff --git a/llarp/dht/publishservicejob.hpp b/llarp/dht/publishservicejob.hpp index d23690f9b..7be563e30 100644 --- a/llarp/dht/publishservicejob.hpp +++ b/llarp/dht/publishservicejob.hpp @@ -1,10 +1,10 @@ #ifndef LLARP_DHT_PUBLISHSERVICEJOB #define LLARP_DHT_PUBLISHSERVICEJOB -#include -#include -#include -#include +#include "tx.hpp" +#include "txowner.hpp" +#include +#include #include diff --git a/llarp/dht/recursiverouterlookup.cpp b/llarp/dht/recursiverouterlookup.cpp index 537026382..f4d881622 100644 --- a/llarp/dht/recursiverouterlookup.cpp +++ b/llarp/dht/recursiverouterlookup.cpp @@ -1,11 +1,11 @@ -#include +#include "recursiverouterlookup.hpp" -#include -#include -#include +#include "context.hpp" +#include +#include -#include -#include +#include +#include #include diff --git a/llarp/dht/recursiverouterlookup.hpp b/llarp/dht/recursiverouterlookup.hpp index 78c7211e4..69344c4f8 100644 --- a/llarp/dht/recursiverouterlookup.hpp +++ b/llarp/dht/recursiverouterlookup.hpp @@ -1,10 +1,10 @@ #ifndef LLARP_DHT_RECURSIVEROUTERLOOKUP #define LLARP_DHT_RECURSIVEROUTERLOOKUP -#include +#include "tx.hpp" -#include -#include +#include +#include namespace llarp { diff --git a/llarp/dht/serviceaddresslookup.cpp b/llarp/dht/serviceaddresslookup.cpp index 15b54d3f2..bdbee13fd 100644 --- a/llarp/dht/serviceaddresslookup.cpp +++ b/llarp/dht/serviceaddresslookup.cpp @@ -1,8 +1,8 @@ -#include +#include "serviceaddresslookup.hpp" -#include -#include -#include +#include "context.hpp" +#include +#include #include namespace llarp diff --git a/llarp/dht/serviceaddresslookup.hpp b/llarp/dht/serviceaddresslookup.hpp index 3ac858b21..fbdf5e4ae 100644 --- a/llarp/dht/serviceaddresslookup.hpp +++ b/llarp/dht/serviceaddresslookup.hpp @@ -1,10 +1,10 @@ #ifndef LLARP_DHT_SERVICEADDRESSLOOKUP #define LLARP_DHT_SERVICEADDRESSLOOKUP -#include -#include -#include -#include +#include "key.hpp" +#include "tx.hpp" +#include +#include namespace llarp { diff --git a/llarp/dht/taglookup.cpp b/llarp/dht/taglookup.cpp index 650328fe4..85df37e37 100644 --- a/llarp/dht/taglookup.cpp +++ b/llarp/dht/taglookup.cpp @@ -1,7 +1,7 @@ -#include +#include "taglookup.hpp" -#include -#include +#include "context.hpp" +#include namespace llarp { diff --git a/llarp/dht/taglookup.hpp b/llarp/dht/taglookup.hpp index f723dadee..b40c352dc 100644 --- a/llarp/dht/taglookup.hpp +++ b/llarp/dht/taglookup.hpp @@ -1,9 +1,9 @@ #ifndef LLARP_DHT_TAGLOOKUP #define LLARP_DHT_TAGLOOKUP -#include -#include -#include +#include "tx.hpp" +#include +#include namespace llarp { diff --git a/llarp/dht/tx.hpp b/llarp/dht/tx.hpp index 7b55e062a..f50fe3d8e 100644 --- a/llarp/dht/tx.hpp +++ b/llarp/dht/tx.hpp @@ -1,10 +1,10 @@ #ifndef LLARP_DHT_TX #define LLARP_DHT_TX -#include -#include -#include -#include +#include "key.hpp" +#include "txowner.hpp" +#include +#include #include #include diff --git a/llarp/dht/txholder.hpp b/llarp/dht/txholder.hpp index c24347529..2c7100146 100644 --- a/llarp/dht/txholder.hpp +++ b/llarp/dht/txholder.hpp @@ -1,10 +1,10 @@ #ifndef LLARP_DHT_TXHOLDER #define LLARP_DHT_TXHOLDER -#include -#include -#include -#include +#include "tx.hpp" +#include "txowner.hpp" +#include +#include #include #include diff --git a/llarp/dht/txowner.hpp b/llarp/dht/txowner.hpp index 1d8076f12..d334064bb 100644 --- a/llarp/dht/txowner.hpp +++ b/llarp/dht/txowner.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_DHT_TXOWNER_HPP -#define LLARP_DHT_TXOWNER_HPP +#pragma once -#include -#include +#include "key.hpp" +#include #include namespace llarp @@ -59,5 +58,3 @@ namespace llarp }; } // namespace dht } // namespace llarp - -#endif diff --git a/llarp/dns/dns.hpp b/llarp/dns/dns.hpp index c9f52d514..f6c3cf5a9 100644 --- a/llarp/dns/dns.hpp +++ b/llarp/dns/dns.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_DNS_DNS_HPP -#define LLARP_DNS_DNS_HPP +#pragma once #include @@ -29,5 +28,3 @@ namespace llarp } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/message.cpp b/llarp/dns/message.cpp index d35a95957..99ffed763 100644 --- a/llarp/dns/message.cpp +++ b/llarp/dns/message.cpp @@ -1,12 +1,12 @@ -#include - -#include -#include -#include -#include -#include -#include -#include +#include "message.hpp" + +#include "dns.hpp" +#include "srv_data.hpp" +#include +#include +#include +#include +#include #include diff --git a/llarp/dns/message.hpp b/llarp/dns/message.hpp index 82ffe7bec..b7d4571b1 100644 --- a/llarp/dns/message.hpp +++ b/llarp/dns/message.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DNS_MESSAGE_HPP -#define LLARP_DNS_MESSAGE_HPP +#pragma once -#include -#include -#include +#include "serialize.hpp" +#include "rr.hpp" +#include "question.hpp" namespace llarp { @@ -106,5 +105,3 @@ namespace llarp } } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/name.cpp b/llarp/dns/name.cpp index 6f627a652..6f81f4f4f 100644 --- a/llarp/dns/name.cpp +++ b/llarp/dns/name.cpp @@ -1,8 +1,8 @@ #define __USE_MINGW_ANSI_STDIO 1 -#include -#include -#include -#include +#include "name.hpp" +#include +#include +#include #include #include diff --git a/llarp/dns/name.hpp b/llarp/dns/name.hpp index 7bf91baad..2b93941a5 100644 --- a/llarp/dns/name.hpp +++ b/llarp/dns/name.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_DNS_NAME_HPP -#define LLARP_DNS_NAME_HPP +#pragma once -#include -#include +#include +#include #include @@ -28,5 +27,3 @@ namespace llarp } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/query.hpp b/llarp/dns/query.hpp index 665e98e2f..6f70f09be 100644 --- a/llarp/dns/query.hpp +++ b/llarp/dns/query.hpp @@ -1,4 +1 @@ -#ifndef LLARP_DNS_QUERY_HPP -#define LLARP_DNS_QUERY_HPP - -#endif +#pragma once diff --git a/llarp/dns/question.cpp b/llarp/dns/question.cpp index 16897d308..7ec066c30 100644 --- a/llarp/dns/question.cpp +++ b/llarp/dns/question.cpp @@ -1,8 +1,8 @@ -#include +#include "question.hpp" -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/dns/question.hpp b/llarp/dns/question.hpp index fea43246c..f2fc00076 100644 --- a/llarp/dns/question.hpp +++ b/llarp/dns/question.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DNS_QUESTION_HPP -#define LLARP_DNS_QUESTION_HPP +#pragma once -#include -#include -#include +#include "serialize.hpp" +#include "name.hpp" +#include namespace llarp { @@ -69,5 +68,3 @@ namespace llarp } } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/rr.cpp b/llarp/dns/rr.cpp index af1210369..3fac87e9b 100644 --- a/llarp/dns/rr.cpp +++ b/llarp/dns/rr.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include -#include +#include "rr.hpp" +#include "dns.hpp" +#include +#include +#include namespace llarp { diff --git a/llarp/dns/rr.hpp b/llarp/dns/rr.hpp index d4cbb3005..0b50235da 100644 --- a/llarp/dns/rr.hpp +++ b/llarp/dns/rr.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_DNS_RR_HPP -#define LLARP_DNS_RR_HPP +#pragma once -#include -#include -#include +#include "name.hpp" +#include "serialize.hpp" +#include #include #include @@ -49,5 +48,3 @@ namespace llarp } } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/serialize.cpp b/llarp/dns/serialize.cpp index f848da23c..6f9d25c75 100644 --- a/llarp/dns/serialize.cpp +++ b/llarp/dns/serialize.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "serialize.hpp" +#include namespace llarp { diff --git a/llarp/dns/serialize.hpp b/llarp/dns/serialize.hpp index 1aa875ef4..8834de04c 100644 --- a/llarp/dns/serialize.hpp +++ b/llarp/dns/serialize.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_DNS_SERIALIZE_HPP -#define LLARP_DNS_SERIALIZE_HPP +#pragma once -#include +#include #include @@ -31,5 +30,3 @@ namespace llarp } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/server.cpp b/llarp/dns/server.cpp index 2c7dae55a..d80b79738 100644 --- a/llarp/dns/server.cpp +++ b/llarp/dns/server.cpp @@ -1,9 +1,9 @@ -#include -#include -#include +#include "server.hpp" +#include "dns.hpp" +#include #include #include -#include +#include namespace llarp::dns { diff --git a/llarp/dns/server.hpp b/llarp/dns/server.hpp index b9080c68b..411c57cf2 100644 --- a/llarp/dns/server.hpp +++ b/llarp/dns/server.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_DNS_SERVER_HPP -#define LLARP_DNS_SERVER_HPP +#pragma once -#include -#include -#include -#include +#include "message.hpp" +#include +#include +#include "unbound_resolver.hpp" #include @@ -87,5 +86,3 @@ namespace llarp }; } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/srv_data.cpp b/llarp/dns/srv_data.cpp index 68a804c3a..0801bfc69 100644 --- a/llarp/dns/srv_data.cpp +++ b/llarp/dns/srv_data.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "srv_data.hpp" +#include +#include #include diff --git a/llarp/dns/srv_data.hpp b/llarp/dns/srv_data.hpp index 5b53b8c22..b7547bc8c 100644 --- a/llarp/dns/srv_data.hpp +++ b/llarp/dns/srv_data.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include "name.hpp" +#include "serialize.hpp" #include #include diff --git a/llarp/dns/string.hpp b/llarp/dns/string.hpp index 70620447f..f32503d3f 100644 --- a/llarp/dns/string.hpp +++ b/llarp/dns/string.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_DNS_STRING_HPP -#define LLARP_DNS_STRING_HPP +#pragma once #include @@ -21,5 +20,3 @@ namespace llarp } // namespace dns } // namespace llarp - -#endif diff --git a/llarp/dns/unbound_resolver.cpp b/llarp/dns/unbound_resolver.cpp index 946cdfdba..c824a6eac 100644 --- a/llarp/dns/unbound_resolver.cpp +++ b/llarp/dns/unbound_resolver.cpp @@ -1,7 +1,7 @@ -#include +#include "unbound_resolver.hpp" -#include -#include +#include "server.hpp" +#include namespace llarp::dns { diff --git a/llarp/dns/unbound_resolver.hpp b/llarp/dns/unbound_resolver.hpp index 0d85a7304..215da4444 100644 --- a/llarp/dns/unbound_resolver.hpp +++ b/llarp/dns/unbound_resolver.hpp @@ -6,9 +6,9 @@ #include #include -#include +#include -#include +#include "message.hpp" #ifdef _WIN32 #include diff --git a/llarp/ev/ev.cpp b/llarp/ev/ev.cpp index 348338bdb..9c86b8cdd 100644 --- a/llarp/ev/ev.cpp +++ b/llarp/ev/ev.cpp @@ -1,13 +1,13 @@ -#include -#include -#include +#include "ev.hpp" +#include +#include #include #include #include // We libuv now -#include +#include "ev_libuv.hpp" namespace llarp { diff --git a/llarp/ev/ev.hpp b/llarp/ev/ev.hpp index 3eb00581b..ea6ee9cfd 100644 --- a/llarp/ev/ev.hpp +++ b/llarp/ev/ev.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_EV_HPP -#define LLARP_EV_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -220,4 +219,3 @@ namespace llarp using EventLoop_ptr = std::shared_ptr; } // namespace llarp -#endif diff --git a/llarp/ev/ev_libuv.cpp b/llarp/ev/ev_libuv.cpp index a48fe1bf8..65f5d4734 100644 --- a/llarp/ev/ev_libuv.cpp +++ b/llarp/ev/ev_libuv.cpp @@ -1,12 +1,12 @@ -#include -#include +#include "ev_libuv.hpp" +#include "vpn.hpp" #include #include #include -#include +#include #include -#include "ev/ev.hpp" +#include "ev.hpp" #include diff --git a/llarp/ev/ev_libuv.hpp b/llarp/ev/ev_libuv.hpp index 8499c2e7a..926ec164a 100644 --- a/llarp/ev/ev_libuv.hpp +++ b/llarp/ev/ev_libuv.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_EV_LIBUV_HPP -#define LLARP_EV_LIBUV_HPP -#include +#pragma once +#include "ev.hpp" #include "udp_handle.hpp" -#include -#include +#include +#include #include #include @@ -96,5 +95,3 @@ namespace llarp::uv }; } // namespace llarp::uv - -#endif diff --git a/llarp/ev/vpn.hpp b/llarp/ev/vpn.hpp index 39c502681..6f5c3c540 100644 --- a/llarp/ev/vpn.hpp +++ b/llarp/ev/vpn.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include namespace llarp diff --git a/llarp/ev/vpnio.cpp b/llarp/ev/vpnio.cpp index 50a3e4b88..cb98bd05c 100644 --- a/llarp/ev/vpnio.cpp +++ b/llarp/ev/vpnio.cpp @@ -1,6 +1,6 @@ -#include +#include "vpnio.hpp" #include -#include +#include void llarp_vpn_io_impl::AsyncClose() diff --git a/llarp/ev/vpnio.hpp b/llarp/ev/vpnio.hpp index 980bf0a2c..f333fd728 100644 --- a/llarp/ev/vpnio.hpp +++ b/llarp/ev/vpnio.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_EV_VPNIO_HPP -#define LLARP_EV_VPNIO_HPP -#include -#include +#pragma once +#include +#include #include #include @@ -42,5 +41,3 @@ struct llarp_vpn_io_impl void Expunge(); }; - -#endif diff --git a/llarp/exit/context.cpp b/llarp/exit/context.cpp index 0abcf1cb3..b2a7581e4 100644 --- a/llarp/exit/context.cpp +++ b/llarp/exit/context.cpp @@ -1,4 +1,4 @@ -#include +#include "context.hpp" #include #include diff --git a/llarp/exit/context.hpp b/llarp/exit/context.hpp index e9d90e3e2..cfc71ea97 100644 --- a/llarp/exit/context.hpp +++ b/llarp/exit/context.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_EXIT_CONTEXT_HPP -#define LLARP_EXIT_CONTEXT_HPP -#include -#include +#pragma once +#include "policy.hpp" +#include #include #include @@ -52,5 +51,3 @@ namespace llarp }; } // namespace exit } // namespace llarp - -#endif diff --git a/llarp/exit/endpoint.cpp b/llarp/exit/endpoint.cpp index b0e77b461..ad15885b4 100644 --- a/llarp/exit/endpoint.cpp +++ b/llarp/exit/endpoint.cpp @@ -1,8 +1,8 @@ -#include +#include "endpoint.hpp" -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/exit/endpoint.hpp b/llarp/exit/endpoint.hpp index 35e4d4619..b27a4fd4f 100644 --- a/llarp/exit/endpoint.hpp +++ b/llarp/exit/endpoint.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_EXIT_ENDPOINT_HPP -#define LLARP_EXIT_ENDPOINT_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -142,5 +141,3 @@ namespace llarp }; } // namespace exit } // namespace llarp - -#endif diff --git a/llarp/exit/exit_messages.cpp b/llarp/exit/exit_messages.cpp index 75adb2634..c3b6fd674 100644 --- a/llarp/exit/exit_messages.cpp +++ b/llarp/exit/exit_messages.cpp @@ -1,7 +1,7 @@ -#include +#include "exit_messages.hpp" -#include -#include +#include +#include namespace llarp { diff --git a/llarp/exit/exit_messages.hpp b/llarp/exit/exit_messages.hpp index b5a37e405..5c0710fb8 100644 --- a/llarp/exit/exit_messages.hpp +++ b/llarp/exit/exit_messages.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_EXIT_MESSAGES_HPP -#define LLARP_EXIT_MESSAGES_HPP +#pragma once -#include -#include -#include +#include +#include "policy.hpp" +#include #include @@ -214,5 +213,3 @@ namespace llarp } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/exit/policy.cpp b/llarp/exit/policy.cpp index 558ef8083..d9b230f51 100644 --- a/llarp/exit/policy.cpp +++ b/llarp/exit/policy.cpp @@ -1,4 +1,4 @@ -#include +#include "policy.hpp" namespace llarp { diff --git a/llarp/exit/policy.hpp b/llarp/exit/policy.hpp index 55ba2cefa..ed8e857fd 100644 --- a/llarp/exit/policy.hpp +++ b/llarp/exit/policy.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_EXIT_POLICY_HPP -#define LLARP_EXIT_POLICY_HPP +#pragma once -#include +#include namespace llarp { @@ -28,5 +27,3 @@ namespace llarp }; } // namespace exit } // namespace llarp - -#endif diff --git a/llarp/exit/session.cpp b/llarp/exit/session.cpp index 9211c3ba6..56be7332f 100644 --- a/llarp/exit/session.cpp +++ b/llarp/exit/session.cpp @@ -1,11 +1,11 @@ -#include - -#include -#include -#include -#include -#include -#include +#include "session.hpp" + +#include +#include +#include +#include +#include +#include #include namespace llarp diff --git a/llarp/exit/session.hpp b/llarp/exit/session.hpp index 625436b5d..0e3f5b659 100644 --- a/llarp/exit/session.hpp +++ b/llarp/exit/session.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_EXIT_SESSION_HPP -#define LLARP_EXIT_SESSION_HPP +#pragma once -#include -#include -#include -#include -#include +#include "exit_messages.hpp" +#include +#include +#include +#include #include #include @@ -225,5 +224,3 @@ namespace llarp } // namespace exit } // namespace llarp - -#endif diff --git a/llarp/handlers/exit.cpp b/llarp/handlers/exit.cpp index eae740e02..5c595547a 100644 --- a/llarp/handlers/exit.cpp +++ b/llarp/handlers/exit.cpp @@ -1,11 +1,11 @@ -#include - -#include -#include -#include -#include -#include -#include +#include "exit.hpp" + +#include +#include +#include +#include +#include +#include #include diff --git a/llarp/handlers/exit.hpp b/llarp/handlers/exit.hpp index 9c3af2b17..cc408a3f7 100644 --- a/llarp/handlers/exit.hpp +++ b/llarp/handlers/exit.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_HANDLERS_EXIT_HPP -#define LLARP_HANDLERS_EXIT_HPP +#pragma once -#include -#include -#include +#include +#include "tun.hpp" +#include #include namespace llarp @@ -186,4 +185,3 @@ namespace llarp }; } // namespace handlers } // namespace llarp -#endif diff --git a/llarp/handlers/null.hpp b/llarp/handlers/null.hpp index e03a546ed..80f27d724 100644 --- a/llarp/handlers/null.hpp +++ b/llarp/handlers/null.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_HANDLERS_NULL_HPP -#define LLARP_HANDLERS_NULL_HPP +#pragma once -#include +#include namespace llarp { @@ -50,5 +49,3 @@ namespace llarp }; } // namespace handlers } // namespace llarp - -#endif diff --git a/llarp/handlers/tun.cpp b/llarp/handlers/tun.cpp index 0d7911bc6..940570dda 100644 --- a/llarp/handlers/tun.cpp +++ b/llarp/handlers/tun.cpp @@ -1,30 +1,30 @@ #include -#include "net/net.hpp" +#include // harmless on other platforms #define __USE_MINGW_ANSI_STDIO 1 -#include +#include "tun.hpp" #include #ifndef _WIN32 #include #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include namespace llarp { diff --git a/llarp/handlers/tun.hpp b/llarp/handlers/tun.hpp index b0c428e70..5dd2312ac 100644 --- a/llarp/handlers/tun.hpp +++ b/llarp/handlers/tun.hpp @@ -1,16 +1,15 @@ -#ifndef LLARP_HANDLERS_TUN_HPP -#define LLARP_HANDLERS_TUN_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -261,5 +260,3 @@ namespace llarp } // namespace handlers } // namespace llarp - -#endif diff --git a/llarp/hook/ihook.hpp b/llarp/hook/ihook.hpp index 4fc211b99..0f132ba45 100644 --- a/llarp/hook/ihook.hpp +++ b/llarp/hook/ihook.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_HOOK_IHOOK_HPP -#define LLARP_HOOK_IHOOK_HPP +#pragma once #include #include #include @@ -29,5 +28,3 @@ namespace llarp inline IBackend::~IBackend() = default; } // namespace hooks } // namespace llarp - -#endif diff --git a/llarp/hook/shell.cpp b/llarp/hook/shell.cpp index 17d9e5736..9de5e2aee 100644 --- a/llarp/hook/shell.cpp +++ b/llarp/hook/shell.cpp @@ -1,4 +1,4 @@ -#include +#include "shell.hpp" #if defined(ENABLE_SHELLHOOKS) #include diff --git a/llarp/hook/shell.hpp b/llarp/hook/shell.hpp index 685ef6400..32695542f 100644 --- a/llarp/hook/shell.hpp +++ b/llarp/hook/shell.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_HOOK_SHELL_HPP -#define LLARP_HOOK_SHELL_HPP +#pragma once #include "ihook.hpp" @@ -12,4 +11,3 @@ namespace llarp ExecShellBackend(std::string execFilePath); } // namespace hooks } // namespace llarp -#endif \ No newline at end of file diff --git a/llarp/iwp/iwp.cpp b/llarp/iwp/iwp.cpp index 14ab566d3..2ed7e2110 100644 --- a/llarp/iwp/iwp.cpp +++ b/llarp/iwp/iwp.cpp @@ -1,7 +1,7 @@ -#include -#include +#include "iwp.hpp" +#include "linklayer.hpp" #include -#include +#include namespace llarp { diff --git a/llarp/iwp/iwp.hpp b/llarp/iwp/iwp.hpp index 2fb15ea82..54a353d37 100644 --- a/llarp/iwp/iwp.hpp +++ b/llarp/iwp/iwp.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_IWP_HPP -#define LLARP_IWP_HPP +#pragma once -#include -#include +#include +#include "linklayer.hpp" #include -#include +#include namespace llarp::iwp { @@ -39,5 +38,3 @@ namespace llarp::iwp WorkerFunc_t work); } // namespace llarp::iwp - -#endif diff --git a/llarp/iwp/linklayer.cpp b/llarp/iwp/linklayer.cpp index 1b4b23f4f..527510d8e 100644 --- a/llarp/iwp/linklayer.cpp +++ b/llarp/iwp/linklayer.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "linklayer.hpp" +#include "session.hpp" +#include #include #include diff --git a/llarp/iwp/linklayer.hpp b/llarp/iwp/linklayer.hpp index ec7a2ed26..0bdd5d7f5 100644 --- a/llarp/iwp/linklayer.hpp +++ b/llarp/iwp/linklayer.hpp @@ -1,16 +1,15 @@ -#ifndef LLARP_IWP_LINKLAYER_HPP -#define LLARP_IWP_LINKLAYER_HPP +#pragma once -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include namespace llarp::iwp { @@ -69,5 +68,3 @@ namespace llarp::iwp using LinkLayer_ptr = std::shared_ptr; } // namespace llarp::iwp - -#endif diff --git a/llarp/iwp/message_buffer.cpp b/llarp/iwp/message_buffer.cpp index cb3bba483..56ea3ead6 100644 --- a/llarp/iwp/message_buffer.cpp +++ b/llarp/iwp/message_buffer.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "message_buffer.hpp" +#include "session.hpp" +#include namespace llarp { diff --git a/llarp/iwp/message_buffer.hpp b/llarp/iwp/message_buffer.hpp index 020d68171..e760a8ac5 100644 --- a/llarp/iwp/message_buffer.hpp +++ b/llarp/iwp/message_buffer.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_IWP_MESSAGE_BUFFER_HPP -#define LLARP_IWP_MESSAGE_BUFFER_HPP +#pragma once #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace llarp { @@ -115,5 +114,3 @@ namespace llarp } // namespace iwp } // namespace llarp - -#endif diff --git a/llarp/iwp/session.cpp b/llarp/iwp/session.cpp index 5e42ae9da..a0d5942c5 100644 --- a/llarp/iwp/session.cpp +++ b/llarp/iwp/session.cpp @@ -1,8 +1,8 @@ -#include +#include "session.hpp" -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/iwp/session.hpp b/llarp/iwp/session.hpp index be360a44e..7a96c4389 100644 --- a/llarp/iwp/session.hpp +++ b/llarp/iwp/session.hpp @@ -1,17 +1,16 @@ -#ifndef LLARP_IWP_SESSION_HPP -#define LLARP_IWP_SESSION_HPP +#pragma once -#include -#include -#include -#include +#include +#include "linklayer.hpp" +#include "message_buffer.hpp" +#include #include #include #include #include -#include +#include namespace llarp { @@ -269,5 +268,3 @@ namespace llarp }; } // namespace iwp } // namespace llarp - -#endif diff --git a/llarp/link/factory.cpp b/llarp/link/factory.cpp index 74c959598..f94e01053 100644 --- a/llarp/link/factory.cpp +++ b/llarp/link/factory.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "factory.hpp" +#include namespace llarp { diff --git a/llarp/link/factory.hpp b/llarp/link/factory.hpp index 905fc8680..e87f31464 100644 --- a/llarp/link/factory.hpp +++ b/llarp/link/factory.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_LINK_FACTORY_HPP -#define LLARP_LINK_FACTORY_HPP -#include +#pragma once +#include #include #include #include -#include +#include "server.hpp" namespace llarp { @@ -47,5 +46,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/link/i_link_manager.hpp b/llarp/link/i_link_manager.hpp index 608903d26..12689c2c0 100644 --- a/llarp/link/i_link_manager.hpp +++ b/llarp/link/i_link_manager.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_I_LINK_MANAGER_HPP -#define LLARP_I_LINK_MANAGER_HPP +#pragma once -#include -#include -#include +#include "server.hpp" +#include +#include #include #include @@ -98,5 +97,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_I_LINK_MANAGER_HPP diff --git a/llarp/link/link_manager.cpp b/llarp/link/link_manager.cpp index 0f85bfba1..a680488ac 100644 --- a/llarp/link/link_manager.cpp +++ b/llarp/link/link_manager.cpp @@ -1,7 +1,7 @@ -#include +#include "link_manager.hpp" -#include -#include +#include +#include #include #include diff --git a/llarp/link/link_manager.hpp b/llarp/link/link_manager.hpp index f8371c81c..8cf7d58ba 100644 --- a/llarp/link/link_manager.hpp +++ b/llarp/link/link_manager.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_LINK_MANAGER_HPP -#define LLARP_LINK_MANAGER_HPP +#pragma once -#include +#include "i_link_manager.hpp" -#include -#include +#include +#include "server.hpp" #include #include @@ -114,5 +113,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_LINK_MANAGER_HPP diff --git a/llarp/link/server.cpp b/llarp/link/server.cpp index aef138e62..78f8099fe 100644 --- a/llarp/link/server.cpp +++ b/llarp/link/server.cpp @@ -1,10 +1,10 @@ -#include -#include -#include -#include -#include +#include "server.hpp" +#include +#include +#include +#include #include -#include +#include #include #include diff --git a/llarp/link/server.hpp b/llarp/link/server.hpp index 2e9f828a0..6fe75c68b 100644 --- a/llarp/link/server.hpp +++ b/llarp/link/server.hpp @@ -1,14 +1,13 @@ -#ifndef LLARP_LINK_SERVER_HPP -#define LLARP_LINK_SERVER_HPP - -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include "session.hpp" +#include +#include +#include +#include +#include #include #include @@ -262,5 +261,3 @@ namespace llarp using LinkLayer_ptr = std::shared_ptr; } // namespace llarp - -#endif diff --git a/llarp/link/session.cpp b/llarp/link/session.cpp index b7014966c..016b1fcff 100644 --- a/llarp/link/session.cpp +++ b/llarp/link/session.cpp @@ -1,4 +1,4 @@ -#include +#include "session.hpp" namespace llarp { diff --git a/llarp/link/session.hpp b/llarp/link/session.hpp index 8a744c07e..60430458f 100644 --- a/llarp/link/session.hpp +++ b/llarp/link/session.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_LINK_SESSION_HPP -#define LLARP_LINK_SESSION_HPP +#pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -133,5 +132,3 @@ namespace llarp ExtractStatus() const = 0; }; } // namespace llarp - -#endif diff --git a/llarp/linux/netns.cpp b/llarp/linux/netns.cpp index e6361e28e..a40dbf768 100644 --- a/llarp/linux/netns.cpp +++ b/llarp/linux/netns.cpp @@ -14,12 +14,12 @@ #include #include #include -#include +#include "netns.hpp" #include #ifndef MS_REC #define MS_REC (16384) #endif -#include +#include namespace llarp { diff --git a/llarp/linux/netns.hpp b/llarp/linux/netns.hpp index 31de0f9f1..8b7ddd56b 100644 --- a/llarp/linux/netns.hpp +++ b/llarp/linux/netns.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_LINUX_NETNS_HPP -#define LLARP_LINUX_NETNS_HPP +#pragma once #ifdef __linux__ namespace llarp { @@ -14,4 +13,3 @@ namespace llarp #else #error "Don't include this file" #endif -#endif diff --git a/llarp/messages/dht_immediate.cpp b/llarp/messages/dht_immediate.cpp index 584205906..50ea7d0b1 100644 --- a/llarp/messages/dht_immediate.cpp +++ b/llarp/messages/dht_immediate.cpp @@ -1,6 +1,6 @@ -#include +#include "dht_immediate.hpp" -#include +#include namespace llarp { diff --git a/llarp/messages/dht_immediate.hpp b/llarp/messages/dht_immediate.hpp index 02b12f0aa..fca01d581 100644 --- a/llarp/messages/dht_immediate.hpp +++ b/llarp/messages/dht_immediate.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_MESSAGES_DHT_IMMEDIATE_HPP -#define LLARP_MESSAGES_DHT_IMMEDIATE_HPP +#pragma once -#include -#include +#include +#include "link_message.hpp" #include @@ -34,5 +33,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/messages/discard.hpp b/llarp/messages/discard.hpp index 2b1c97b4b..2466cb3d0 100644 --- a/llarp/messages/discard.hpp +++ b/llarp/messages/discard.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_MESSAGES_DISCARD_HPP -#define LLARP_MESSAGES_DISCARD_HPP +#pragma once -#include -#include -#include -#include +#include "link_message.hpp" +#include +#include +#include namespace llarp { @@ -119,5 +118,3 @@ namespace llarp } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/messages/link_intro.cpp b/llarp/messages/link_intro.cpp index 9de060433..f334e2aba 100644 --- a/llarp/messages/link_intro.cpp +++ b/llarp/messages/link_intro.cpp @@ -1,10 +1,10 @@ -#include +#include "link_intro.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/messages/link_intro.hpp b/llarp/messages/link_intro.hpp index fcffa5a52..7cdc3190e 100644 --- a/llarp/messages/link_intro.hpp +++ b/llarp/messages/link_intro.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_MESSAGES_LINK_INTRO_HPP -#define LLARP_MESSAGES_LINK_INTRO_HPP +#pragma once -#include -#include -#include +#include +#include "link_message.hpp" +#include namespace llarp { @@ -53,5 +52,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/messages/link_message.hpp b/llarp/messages/link_message.hpp index 4792e2273..9ed1cf2f9 100644 --- a/llarp/messages/link_message.hpp +++ b/llarp/messages/link_message.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_LINK_MESSAGE_HPP -#define LLARP_LINK_MESSAGE_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -65,5 +64,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/messages/link_message_parser.cpp b/llarp/messages/link_message_parser.cpp index fa3302b01..bd47ac67a 100644 --- a/llarp/messages/link_message_parser.cpp +++ b/llarp/messages/link_message_parser.cpp @@ -1,15 +1,15 @@ -#include +#include "link_message_parser.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "dht_immediate.hpp" +#include "discard.hpp" +#include "link_intro.hpp" +#include "link_message.hpp" +#include "relay_commit.hpp" +#include "relay_status.hpp" +#include "relay.hpp" +#include +#include +#include #include diff --git a/llarp/messages/link_message_parser.hpp b/llarp/messages/link_message_parser.hpp index c2077395c..f20e5dc65 100644 --- a/llarp/messages/link_message_parser.hpp +++ b/llarp/messages/link_message_parser.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_LINK_MESSAGE_PARSER_HPP -#define LLARP_LINK_MESSAGE_PARSER_HPP +#pragma once -#include -#include +#include +#include #include @@ -48,4 +47,3 @@ namespace llarp std::unique_ptr holder; }; } // namespace llarp -#endif diff --git a/llarp/messages/relay.cpp b/llarp/messages/relay.cpp index 9c39db086..3a408d922 100644 --- a/llarp/messages/relay.cpp +++ b/llarp/messages/relay.cpp @@ -1,8 +1,8 @@ -#include +#include "relay.hpp" -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/messages/relay.hpp b/llarp/messages/relay.hpp index 5e14bc6b0..a7d07c8de 100644 --- a/llarp/messages/relay.hpp +++ b/llarp/messages/relay.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_MESSAGES_RELAY_HPP -#define LLARP_MESSAGES_RELAY_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include "link_message.hpp" +#include #include @@ -69,5 +68,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/messages/relay_commit.cpp b/llarp/messages/relay_commit.cpp index 6807b16a0..6c5e7b8b9 100644 --- a/llarp/messages/relay_commit.cpp +++ b/llarp/messages/relay_commit.cpp @@ -1,18 +1,18 @@ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "relay_commit.hpp" +#include "relay_status.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/llarp/messages/relay_commit.hpp b/llarp/messages/relay_commit.hpp index c256d54f0..b019c1e53 100644 --- a/llarp/messages/relay_commit.hpp +++ b/llarp/messages/relay_commit.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_RELAY_COMMIT_HPP -#define LLARP_RELAY_COMMIT_HPP +#pragma once -#include -#include -#include -#include -#include +#include +#include +#include "link_message.hpp" +#include +#include #include #include @@ -86,5 +85,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/messages/relay_status.cpp b/llarp/messages/relay_status.cpp index 49a04bea2..86753fee4 100644 --- a/llarp/messages/relay_status.cpp +++ b/llarp/messages/relay_status.cpp @@ -1,15 +1,15 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "relay_status.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/llarp/messages/relay_status.hpp b/llarp/messages/relay_status.hpp index c6ac0d51d..5faaf5946 100644 --- a/llarp/messages/relay_status.hpp +++ b/llarp/messages/relay_status.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_RELAY_STATUS_HPP -#define LLARP_RELAY_STATUS_HPP +#pragma once -#include -#include -#include -#include -#include +#include +#include +#include "link_message.hpp" +#include +#include #include #include @@ -112,5 +111,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/net/address_info.cpp b/llarp/net/address_info.cpp index 56a21588d..c4aad84fe 100644 --- a/llarp/net/address_info.cpp +++ b/llarp/net/address_info.cpp @@ -1,13 +1,13 @@ -#include +#include "address_info.hpp" #include #ifndef _WIN32 #include #endif -#include -#include -#include -#include +#include "net.hpp" +#include +#include +#include #include diff --git a/llarp/net/address_info.hpp b/llarp/net/address_info.hpp index 1d82f8669..0a972b011 100644 --- a/llarp/net/address_info.hpp +++ b/llarp/net/address_info.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_AI_HPP -#define LLARP_AI_HPP +#pragma once -#include -#include -#include -#include -#include +#include +#include "ip_address.hpp" +#include "net.h" +#include +#include #include #include @@ -77,5 +76,3 @@ namespace llarp operator<(const AddressInfo& lhs, const AddressInfo& rhs); } // namespace llarp - -#endif diff --git a/llarp/net/exit_info.cpp b/llarp/net/exit_info.cpp index 25a592107..e001c915a 100644 --- a/llarp/net/exit_info.cpp +++ b/llarp/net/exit_info.cpp @@ -2,11 +2,11 @@ #include #endif -#include -#include -#include -#include -#include +#include "exit_info.hpp" +#include "net.hpp" +#include +#include +#include #include #include diff --git a/llarp/net/exit_info.hpp b/llarp/net/exit_info.hpp index 7654cdec6..60021fa69 100644 --- a/llarp/net/exit_info.hpp +++ b/llarp/net/exit_info.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_XI_HPP -#define LLARP_XI_HPP +#pragma once -#include -#include -#include +#include +#include "ip_address.hpp" +#include #include @@ -50,5 +49,3 @@ namespace llarp return xi.print(out, -1, -1); } } // namespace llarp - -#endif diff --git a/llarp/net/ip.cpp b/llarp/net/ip.cpp index ab7a1e4b7..ed30a42de 100644 --- a/llarp/net/ip.cpp +++ b/llarp/net/ip.cpp @@ -1,4 +1,4 @@ -#include +#include "ip.hpp" #include namespace llarp::net diff --git a/llarp/net/ip.hpp b/llarp/net/ip.hpp index 52fba8693..307e5ffe2 100644 --- a/llarp/net/ip.hpp +++ b/llarp/net/ip.hpp @@ -1,5 +1,5 @@ #pragma once -#include +#include "net_int.hpp" #include namespace llarp::net diff --git a/llarp/net/ip_address.cpp b/llarp/net/ip_address.cpp index f08f62f61..62fb2f428 100644 --- a/llarp/net/ip_address.cpp +++ b/llarp/net/ip_address.cpp @@ -1,6 +1,6 @@ -#include +#include "ip_address.hpp" -#include +#include "net.hpp" namespace llarp { diff --git a/llarp/net/ip_address.hpp b/llarp/net/ip_address.hpp index aa4030f90..3e7139645 100644 --- a/llarp/net/ip_address.hpp +++ b/llarp/net/ip_address.hpp @@ -1,12 +1,12 @@ #pragma once -#include +#include "sock_addr.hpp" #include #include #include -#include +#include "net_int.hpp" namespace llarp { diff --git a/llarp/net/ip_packet.cpp b/llarp/net/ip_packet.cpp index c3cb1f239..c983de750 100644 --- a/llarp/net/ip_packet.cpp +++ b/llarp/net/ip_packet.cpp @@ -1,9 +1,9 @@ -#include -#include +#include "ip_packet.hpp" +#include "ip.hpp" -#include -#include -#include +#include +#include +#include #ifndef _WIN32 #include diff --git a/llarp/net/ip_packet.hpp b/llarp/net/ip_packet.hpp index afb06a77a..b013b7f36 100644 --- a/llarp/net/ip_packet.hpp +++ b/llarp/net/ip_packet.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_IP_HPP -#define LLARP_IP_HPP +#pragma once -#include -#include -#include -#include +#include +#include "net.hpp" +#include +#include #ifndef _WIN32 // unix, linux @@ -106,7 +105,7 @@ struct ipv6_header }; #include -#include +#include #include namespace llarp @@ -283,5 +282,3 @@ namespace llarp ipchksum(const byte_t* buf, size_t sz, uint32_t sum = 0); } // namespace net } // namespace llarp - -#endif diff --git a/llarp/net/ip_range.cpp b/llarp/net/ip_range.cpp index d5bf4870f..1d65c0d8b 100644 --- a/llarp/net/ip_range.cpp +++ b/llarp/net/ip_range.cpp @@ -1,4 +1,4 @@ -#include +#include "ip_range.hpp" namespace llarp { diff --git a/llarp/net/ip_range.hpp b/llarp/net/ip_range.hpp index fc26db94f..7564b5a63 100644 --- a/llarp/net/ip_range.hpp +++ b/llarp/net/ip_range.hpp @@ -1,9 +1,9 @@ #pragma once #include -#include -#include -#include -#include +#include "ip.hpp" +#include "net_bits.hpp" +#include +#include #include namespace llarp diff --git a/llarp/net/ip_range_map.hpp b/llarp/net/ip_range_map.hpp index 1aceb9cf0..e76be4861 100644 --- a/llarp/net/ip_range_map.hpp +++ b/llarp/net/ip_range_map.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_NET_IP_RANGE_MAP_HPP -#define LLARP_NET_IP_RANGE_MAP_HPP +#pragma once -#include -#include +#include "ip_range.hpp" +#include #include namespace llarp @@ -149,5 +148,3 @@ namespace llarp }; } // namespace net } // namespace llarp - -#endif diff --git a/llarp/net/net.cpp b/llarp/net/net.cpp index 1d310f57b..48c886fef 100644 --- a/llarp/net/net.cpp +++ b/llarp/net/net.cpp @@ -1,10 +1,10 @@ -#include +#include "net.hpp" -#include +#include "net_if.hpp" #include #ifdef ANDROID -#include +#include #endif #ifndef _WIN32 @@ -14,13 +14,13 @@ #endif #endif -#include -#include -#include -#include +#include "ip.hpp" +#include "ip_range.hpp" +#include +#include #ifdef ANDROID -#include +#include #else #ifndef _WIN32 #include diff --git a/llarp/net/net.h b/llarp/net/net.h index 248d3f3d6..cc0a56741 100644 --- a/llarp/net/net.h +++ b/llarp/net/net.h @@ -1,5 +1,4 @@ -#ifndef LLARP_NET_H -#define LLARP_NET_H +#pragma once #if defined(_WIN32) || defined(__MINGW32__) #include #include @@ -34,5 +33,3 @@ typedef unsigned int in_addr_t; bool llarp_getifaddr(const char* ifname, int af, struct sockaddr* addr); - -#endif diff --git a/llarp/net/net.hpp b/llarp/net/net.hpp index 4cd593fa6..95141f3a9 100644 --- a/llarp/net/net.hpp +++ b/llarp/net/net.hpp @@ -1,14 +1,13 @@ -#ifndef LLARP_NET_HPP -#define LLARP_NET_HPP - -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include "uint128.hpp" +#include "address_info.hpp" +#include "ip_address.hpp" +#include "net_int.hpp" +#include "net.h" +#include "ip_range.hpp" +#include +#include #include #include // for itoa @@ -94,5 +93,3 @@ namespace llarp #endif } // namespace llarp - -#endif diff --git a/llarp/net/net_bits.hpp b/llarp/net/net_bits.hpp index 0f6c5359c..155c80b97 100644 --- a/llarp/net/net_bits.hpp +++ b/llarp/net/net_bits.hpp @@ -1,5 +1,5 @@ #pragma once -#include +#include "net_int.hpp" namespace llarp { diff --git a/llarp/net/net_if.hpp b/llarp/net/net_if.hpp index 90e345425..15e059db2 100644 --- a/llarp/net/net_if.hpp +++ b/llarp/net/net_if.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_NET_NET_IF_HPP -#define LLARP_NET_NET_IF_HPP +#pragma once #ifndef _WIN32 // this file is a shim include for #include #if defined(__linux__) @@ -21,5 +20,3 @@ namespace llarp::net std::string LoopbackInterfaceName(); } // namespace llarp::net - -#endif diff --git a/llarp/net/net_int.cpp b/llarp/net/net_int.cpp index 72de8ca37..8db35d889 100644 --- a/llarp/net/net_int.cpp +++ b/llarp/net/net_int.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "net_int.hpp" +#include "ip.hpp" #include namespace llarp diff --git a/llarp/net/net_int.hpp b/llarp/net/net_int.hpp index bcc3dda7e..2faf244e6 100644 --- a/llarp/net/net_int.hpp +++ b/llarp/net/net_int.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_NET_INT_HPP -#define LLARP_NET_INT_HPP +#pragma once // for addrinfo #ifndef _WIN32 @@ -12,11 +11,11 @@ #define inet_aton(x, y) inet_pton(AF_INET, x, y) #endif -#include +#include "net.h" #include // for itoa #include -#include +#include #include #include "uint128.hpp" @@ -253,5 +252,3 @@ namespace std } }; } // namespace std - -#endif diff --git a/llarp/net/route.cpp b/llarp/net/route.cpp index c66de1b93..840f15dda 100644 --- a/llarp/net/route.cpp +++ b/llarp/net/route.cpp @@ -10,13 +10,13 @@ #include #include #endif -#include +#include "net.hpp" #include #include #endif #ifdef __APPLE__ -#include -#include +#include "net.hpp" +#include #endif #ifdef _WIN32 #include @@ -27,13 +27,13 @@ #include #include #include -#include -#include +#include "net_int.hpp" +#include "ip.hpp" #endif #include -#include -#include +#include +#include namespace llarp::net { diff --git a/llarp/net/sock_addr.cpp b/llarp/net/sock_addr.cpp index 9fdd31a76..d8a9644fc 100644 --- a/llarp/net/sock_addr.cpp +++ b/llarp/net/sock_addr.cpp @@ -1,10 +1,10 @@ -#include -#include -#include -#include -#include -#include -#include +#include "sock_addr.hpp" +#include "address_info.hpp" +#include "ip.hpp" +#include "net_bits.hpp" +#include +#include +#include #include #include diff --git a/llarp/net/sock_addr.hpp b/llarp/net/sock_addr.hpp index 6e0be7e69..336ef426b 100644 --- a/llarp/net/sock_addr.hpp +++ b/llarp/net/sock_addr.hpp @@ -16,7 +16,7 @@ inet_pton(int af, const char* src, void* dst); #include #include -#include +#include "net_int.hpp" namespace llarp { diff --git a/llarp/nodedb.cpp b/llarp/nodedb.cpp index 9503b6e70..397018fb3 100644 --- a/llarp/nodedb.cpp +++ b/llarp/nodedb.cpp @@ -1,14 +1,14 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "nodedb.hpp" + +#include "crypto/crypto.hpp" +#include "crypto/types.hpp" +#include "router_contact.hpp" +#include "util/buffer.hpp" +#include "util/fs.hpp" +#include "util/logging/logger.hpp" +#include "util/mem.hpp" +#include "util/str.hpp" +#include "dht/kademlia.hpp" #include #include diff --git a/llarp/nodedb.hpp b/llarp/nodedb.hpp index db6fc40ea..63cabd8f8 100644 --- a/llarp/nodedb.hpp +++ b/llarp/nodedb.hpp @@ -1,14 +1,13 @@ -#ifndef LLARP_NODEDB_HPP -#define LLARP_NODEDB_HPP - -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include "router_contact.hpp" +#include "router_id.hpp" +#include "util/common.hpp" +#include "util/fs.hpp" +#include "util/thread/threading.hpp" +#include "util/thread/annotations.hpp" +#include "dht/key.hpp" +#include "crypto/crypto.hpp" #include #include @@ -168,4 +167,3 @@ namespace llarp Put(RouterContact rc); }; } // namespace llarp -#endif diff --git a/llarp/path/ihophandler.cpp b/llarp/path/ihophandler.cpp index 0ebe00bdc..5768bb981 100644 --- a/llarp/path/ihophandler.cpp +++ b/llarp/path/ihophandler.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "ihophandler.hpp" +#include namespace llarp { diff --git a/llarp/path/ihophandler.hpp b/llarp/path/ihophandler.hpp index 514b5eac6..a77d5c176 100644 --- a/llarp/path/ihophandler.hpp +++ b/llarp/path/ihophandler.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_PATH_IHOPHANDLER_HPP -#define LLARP_PATH_IHOPHANDLER_HPP - -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include +#include +#include #include #include @@ -92,4 +91,3 @@ namespace llarp using HopHandler_ptr = std::shared_ptr; } // namespace path } // namespace llarp -#endif diff --git a/llarp/path/path.cpp b/llarp/path/path.cpp index a2ae24426..fd55c794f 100644 --- a/llarp/path/path.cpp +++ b/llarp/path/path.cpp @@ -1,20 +1,20 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "path.hpp" + +#include +#include +#include +#include +#include +#include "pathbuilder.hpp" +#include "transit_hop.hpp" +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/llarp/path/path.hpp b/llarp/path/path.hpp index a1a97cd1d..867673a99 100644 --- a/llarp/path/path.hpp +++ b/llarp/path/path.hpp @@ -1,22 +1,21 @@ -#ifndef LLARP_PATH_HPP -#define LLARP_PATH_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include +#include +#include "ihophandler.hpp" +#include "path_types.hpp" +#include "pathbuilder.hpp" +#include "pathset.hpp" +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -421,5 +420,3 @@ namespace llarp }; } // namespace path } // namespace llarp - -#endif diff --git a/llarp/path/path_context.cpp b/llarp/path/path_context.cpp index 75dbc6bcd..2b1382fee 100644 --- a/llarp/path/path_context.cpp +++ b/llarp/path/path_context.cpp @@ -1,9 +1,9 @@ -#include +#include "path_context.hpp" -#include -#include -#include -#include +#include +#include "path.hpp" +#include +#include namespace llarp { diff --git a/llarp/path/path_context.hpp b/llarp/path/path_context.hpp index cb9d08736..a0eec0a5a 100644 --- a/llarp/path/path_context.hpp +++ b/llarp/path/path_context.hpp @@ -1,17 +1,16 @@ -#ifndef LLARP_PATH_CONTEXT_HPP -#define LLARP_PATH_CONTEXT_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include "ihophandler.hpp" +#include "path_types.hpp" +#include "pathset.hpp" +#include "transit_hop.hpp" +#include +#include +#include +#include +#include #include #include @@ -171,5 +170,3 @@ namespace llarp }; } // namespace path } // namespace llarp - -#endif diff --git a/llarp/path/path_types.hpp b/llarp/path/path_types.hpp index ebddc706d..eb3bc5306 100644 --- a/llarp/path/path_types.hpp +++ b/llarp/path/path_types.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_PATH_TYPES_HPP -#define LLARP_PATH_TYPES_HPP +#pragma once -#include -#include +#include +#include namespace llarp { @@ -12,5 +11,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/path/pathbuilder.cpp b/llarp/path/pathbuilder.cpp index 9a6fface6..4f19e04c3 100644 --- a/llarp/path/pathbuilder.cpp +++ b/llarp/path/pathbuilder.cpp @@ -1,13 +1,13 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include +#include "pathbuilder.hpp" + +#include +#include +#include +#include "path_context.hpp" +#include +#include +#include +#include #include diff --git a/llarp/path/pathbuilder.hpp b/llarp/path/pathbuilder.hpp index 89732900d..8e2fd8705 100644 --- a/llarp/path/pathbuilder.hpp +++ b/llarp/path/pathbuilder.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_PATHBUILDER_HPP -#define LLARP_PATHBUILDER_HPP +#pragma once -#include -#include +#include "pathset.hpp" +#include #include #include @@ -127,4 +126,3 @@ namespace llarp } // namespace path } // namespace llarp -#endif diff --git a/llarp/path/pathset.cpp b/llarp/path/pathset.cpp index 8f92436e3..f49acfb55 100644 --- a/llarp/path/pathset.cpp +++ b/llarp/path/pathset.cpp @@ -1,9 +1,9 @@ -#include +#include "pathset.hpp" -#include -#include -#include -#include +#include +#include "path.hpp" +#include +#include #include diff --git a/llarp/path/pathset.hpp b/llarp/path/pathset.hpp index 719171d76..6105bc5b4 100644 --- a/llarp/path/pathset.hpp +++ b/llarp/path/pathset.hpp @@ -1,13 +1,12 @@ -#ifndef LLARP_PATHSET_HPP -#define LLARP_PATHSET_HPP +#pragma once -#include -#include -#include -#include -#include -#include -#include +#include "path_types.hpp" +#include +#include +#include +#include +#include +#include #include #include @@ -324,5 +323,3 @@ namespace llarp } // namespace path } // namespace llarp - -#endif diff --git a/llarp/path/transit_hop.cpp b/llarp/path/transit_hop.cpp index 37388dc4d..fa14c393a 100644 --- a/llarp/path/transit_hop.cpp +++ b/llarp/path/transit_hop.cpp @@ -1,20 +1,20 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "path.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include "path_context.hpp" +#include "transit_hop.hpp" +#include +#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/path/transit_hop.hpp b/llarp/path/transit_hop.hpp index e29837b1f..052b8b9a1 100644 --- a/llarp/path/transit_hop.hpp +++ b/llarp/path/transit_hop.hpp @@ -1,13 +1,12 @@ -#ifndef LLARP_PATH_TRANSIT_HOP_HPP -#define LLARP_PATH_TRANSIT_HOP_HPP +#pragma once -#include -#include -#include -#include -#include -#include -#include +#include +#include "ihophandler.hpp" +#include "path_types.hpp" +#include +#include +#include +#include namespace llarp { @@ -236,5 +235,3 @@ namespace llarp } } // namespace path } // namespace llarp - -#endif diff --git a/llarp/peerstats/orm.hpp b/llarp/peerstats/orm.hpp index c81e599fb..bd60c5d20 100644 --- a/llarp/peerstats/orm.hpp +++ b/llarp/peerstats/orm.hpp @@ -2,7 +2,7 @@ #include -#include +#include "types.hpp" /// Contains some code to help deal with sqlite_orm in hopes of keeping other headers clean diff --git a/llarp/peerstats/peer_db.cpp b/llarp/peerstats/peer_db.cpp index 58f619791..6e1ff7d6a 100644 --- a/llarp/peerstats/peer_db.cpp +++ b/llarp/peerstats/peer_db.cpp @@ -1,8 +1,8 @@ -#include +#include "peer_db.hpp" -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/peerstats/peer_db.hpp b/llarp/peerstats/peer_db.hpp index d5d4a1a05..ecbb739ab 100644 --- a/llarp/peerstats/peer_db.hpp +++ b/llarp/peerstats/peer_db.hpp @@ -6,12 +6,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include "types.hpp" +#include "orm.hpp" namespace llarp { diff --git a/llarp/peerstats/types.cpp b/llarp/peerstats/types.cpp index fe0dd1b4f..e66918b57 100644 --- a/llarp/peerstats/types.cpp +++ b/llarp/peerstats/types.cpp @@ -1,6 +1,6 @@ -#include +#include "types.hpp" -#include +#include #include #include diff --git a/llarp/peerstats/types.hpp b/llarp/peerstats/types.hpp index 78684a61a..166893665 100644 --- a/llarp/peerstats/types.hpp +++ b/llarp/peerstats/types.hpp @@ -3,9 +3,9 @@ #include #include -#include -#include -#include +#include +#include +#include /// Types stored in our peerstats database are declared here diff --git a/llarp/pow.cpp b/llarp/pow.cpp index 510bfddb5..0a5b7993d 100644 --- a/llarp/pow.cpp +++ b/llarp/pow.cpp @@ -1,7 +1,7 @@ -#include +#include "pow.hpp" -#include -#include +#include "crypto/crypto.hpp" +#include "util/buffer.hpp" #include diff --git a/llarp/pow.hpp b/llarp/pow.hpp index 2d4c867ef..c1e947c1e 100644 --- a/llarp/pow.hpp +++ b/llarp/pow.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_POW_HPP -#define LLARP_POW_HPP +#pragma once -#include -#include +#include "router_id.hpp" +#include "util/buffer.hpp" namespace llarp { @@ -49,5 +48,3 @@ namespace llarp return p.print(out, -1, -1); } } // namespace llarp - -#endif diff --git a/llarp/profiling.cpp b/llarp/profiling.cpp index e846a41dc..b5c57ff79 100644 --- a/llarp/profiling.cpp +++ b/llarp/profiling.cpp @@ -1,7 +1,7 @@ -#include +#include "profiling.hpp" #include -#include +#include "util/fs.hpp" namespace llarp { diff --git a/llarp/profiling.hpp b/llarp/profiling.hpp index b20e99b6f..1af23e82f 100644 --- a/llarp/profiling.hpp +++ b/llarp/profiling.hpp @@ -1,12 +1,11 @@ -#ifndef LLARP_PROFILING_HPP -#define LLARP_PROFILING_HPP +#pragma once -#include -#include -#include -#include +#include "path/path.hpp" +#include "router_id.hpp" +#include "util/bencode.hpp" +#include "util/thread/threading.hpp" -#include +#include "util/thread/annotations.hpp" #include namespace llarp @@ -120,5 +119,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/router/abstractrouter.hpp b/llarp/router/abstractrouter.hpp index 793fec6f7..bb7a4d2d5 100644 --- a/llarp/router/abstractrouter.hpp +++ b/llarp/router/abstractrouter.hpp @@ -1,21 +1,20 @@ -#ifndef LLARP_ABSTRACT_ROUTER_HPP -#define LLARP_ABSTRACT_ROUTER_HPP +#pragma once -#include -#include +#include +#include #include -#include -#include -#include +#include +#include +#include "i_outbound_message_handler.hpp" #include -#include +#include #include -#include -#include -#include +#include +#include +#include #ifdef LOKINET_HIVE -#include "tooling/router_event.hpp" +#include #endif struct llarp_buffer_t; @@ -327,5 +326,3 @@ namespace llarp HandleRouterEvent(tooling::RouterEventPtr event) const = 0; }; } // namespace llarp - -#endif diff --git a/llarp/router/i_gossiper.hpp b/llarp/router/i_gossiper.hpp index 27c84d98f..6df477de0 100644 --- a/llarp/router/i_gossiper.hpp +++ b/llarp/router/i_gossiper.hpp @@ -1,6 +1,5 @@ -#ifndef LLARP_GOSSIPER_HPP -#define LLARP_GOSSIPER_HPP -#include +#pragma once +#include namespace llarp { @@ -27,5 +26,3 @@ namespace llarp IsOurRC(const RouterContact& rc) const = 0; }; } // namespace llarp - -#endif diff --git a/llarp/router/i_outbound_message_handler.hpp b/llarp/router/i_outbound_message_handler.hpp index 5f167153a..46d7dcddd 100644 --- a/llarp/router/i_outbound_message_handler.hpp +++ b/llarp/router/i_outbound_message_handler.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_ROUTER_I_OUTBOUND_MESSAGE_HANDLER_HPP -#define LLARP_ROUTER_I_OUTBOUND_MESSAGE_HANDLER_HPP +#pragma once -#include +#include #include #include @@ -46,5 +45,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_ROUTER_I_OUTBOUND_MESSAGE_HANDLER_HPP diff --git a/llarp/router/i_outbound_session_maker.hpp b/llarp/router/i_outbound_session_maker.hpp index ef009221d..5cd1ed8f5 100644 --- a/llarp/router/i_outbound_session_maker.hpp +++ b/llarp/router/i_outbound_session_maker.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_ROUTER_I_OUTBOUND_SESSION_MAKER_HPP -#define LLARP_ROUTER_I_OUTBOUND_SESSION_MAKER_HPP +#pragma once -#include -#include +#include +#include #include @@ -53,5 +52,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_ROUTER_I_OUTBOUND_SESSION_MAKER_HPP diff --git a/llarp/router/i_rc_lookup_handler.hpp b/llarp/router/i_rc_lookup_handler.hpp index d786fb693..42ad1f0ef 100644 --- a/llarp/router/i_rc_lookup_handler.hpp +++ b/llarp/router/i_rc_lookup_handler.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_I_RC_LOOKUP_HANDLER_HPP -#define LLARP_I_RC_LOOKUP_HANDLER_HPP +#pragma once -#include -#include +#include +#include #include #include @@ -62,5 +61,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_I_RC_LOOKUP_HANDLER_HPP diff --git a/llarp/router/outbound_message_handler.cpp b/llarp/router/outbound_message_handler.cpp index 7846f4364..f3354b2c6 100644 --- a/llarp/router/outbound_message_handler.cpp +++ b/llarp/router/outbound_message_handler.cpp @@ -1,12 +1,12 @@ -#include - -#include -#include -#include -#include -#include -#include -#include +#include "outbound_message_handler.hpp" + +#include +#include "i_outbound_session_maker.hpp" +#include "i_rc_lookup_handler.hpp" +#include +#include +#include +#include #include #include diff --git a/llarp/router/outbound_message_handler.hpp b/llarp/router/outbound_message_handler.hpp index f19e87f33..95c31a95b 100644 --- a/llarp/router/outbound_message_handler.hpp +++ b/llarp/router/outbound_message_handler.hpp @@ -1,12 +1,11 @@ -#ifndef LLARP_ROUTER_OUTBOUND_MESSAGE_HANDLER_HPP -#define LLARP_ROUTER_OUTBOUND_MESSAGE_HANDLER_HPP +#pragma once -#include +#include "i_outbound_message_handler.hpp" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -150,5 +149,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_ROUTER_OUTBOUND_MESSAGE_HANDLER_HPP diff --git a/llarp/router/outbound_session_maker.cpp b/llarp/router/outbound_session_maker.cpp index 763353fe9..c980ed592 100644 --- a/llarp/router/outbound_session_maker.cpp +++ b/llarp/router/outbound_session_maker.cpp @@ -1,16 +1,16 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "outbound_session_maker.hpp" + +#include "abstractrouter.hpp" +#include +#include +#include +#include +#include "i_rc_lookup_handler.hpp" +#include +#include +#include +#include +#include #include namespace llarp diff --git a/llarp/router/outbound_session_maker.hpp b/llarp/router/outbound_session_maker.hpp index bf4a39a9e..da52fd474 100644 --- a/llarp/router/outbound_session_maker.hpp +++ b/llarp/router/outbound_session_maker.hpp @@ -1,12 +1,11 @@ -#ifndef LLARP_ROUTER_OUTBOUND_SESSION_MAKER_HPP -#define LLARP_ROUTER_OUTBOUND_SESSION_MAKER_HPP +#pragma once -#include +#include "i_outbound_session_maker.hpp" -#include -#include +#include "i_rc_lookup_handler.hpp" +#include -#include +#include #include #include @@ -118,5 +117,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_ROUTER_OUTBOUND_SESSION_MAKER_HPP diff --git a/llarp/router/rc_gossiper.cpp b/llarp/router/rc_gossiper.cpp index 18a2877cd..e9f839cc1 100644 --- a/llarp/router/rc_gossiper.cpp +++ b/llarp/router/rc_gossiper.cpp @@ -1,9 +1,9 @@ -#include -#include -#include -#include -#include -#include +#include "rc_gossiper.hpp" +#include +#include +#include +#include +#include namespace llarp { diff --git a/llarp/router/rc_gossiper.hpp b/llarp/router/rc_gossiper.hpp index ba9734051..7b836b218 100644 --- a/llarp/router/rc_gossiper.hpp +++ b/llarp/router/rc_gossiper.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_RC_GOSSIPER_HPP -#define LLARP_RC_GOSSIPER_HPP +#pragma once -#include -#include -#include -#include -#include +#include +#include "i_gossiper.hpp" +#include "i_outbound_message_handler.hpp" +#include +#include "abstractrouter.hpp" namespace llarp { @@ -39,5 +38,3 @@ namespace llarp AbstractRouter* m_router; }; } // namespace llarp - -#endif diff --git a/llarp/router/rc_lookup_handler.cpp b/llarp/router/rc_lookup_handler.cpp index f95ed5fbb..bb1e02e1d 100644 --- a/llarp/router/rc_lookup_handler.cpp +++ b/llarp/router/rc_lookup_handler.cpp @@ -1,16 +1,16 @@ #include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "rc_lookup_handler.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "abstractrouter.hpp" #include #include diff --git a/llarp/router/rc_lookup_handler.hpp b/llarp/router/rc_lookup_handler.hpp index f248e2765..8cc7cafe1 100644 --- a/llarp/router/rc_lookup_handler.hpp +++ b/llarp/router/rc_lookup_handler.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_RC_LOOKUP_HANDLER_HPP -#define LLARP_RC_LOOKUP_HANDLER_HPP +#pragma once #include -#include +#include "i_rc_lookup_handler.hpp" -#include +#include #include #include @@ -128,5 +127,3 @@ namespace llarp }; } // namespace llarp - -#endif // LLARP_RC_LOOKUP_HANDLER_HPP diff --git a/llarp/router/route_poker.cpp b/llarp/router/route_poker.cpp index 6dcf14b98..6ad13d147 100644 --- a/llarp/router/route_poker.cpp +++ b/llarp/router/route_poker.cpp @@ -1,7 +1,7 @@ -#include -#include -#include -#include +#include "route_poker.hpp" +#include "abstractrouter.hpp" +#include +#include #include namespace llarp diff --git a/llarp/router/route_poker.hpp b/llarp/router/route_poker.hpp index d5aaa59ae..979d59d65 100644 --- a/llarp/router/route_poker.hpp +++ b/llarp/router/route_poker.hpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include namespace llarp { diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index 54fa51a7d..abd7ed366 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -1,31 +1,31 @@ #include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "router.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tooling/router_event.hpp" -#include "util/status.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include #include #include diff --git a/llarp/router/router.hpp b/llarp/router/router.hpp index e3e82ad30..86b1efd6c 100644 --- a/llarp/router/router.hpp +++ b/llarp/router/router.hpp @@ -1,41 +1,40 @@ -#ifndef LLARP_ROUTER_HPP -#define LLARP_ROUTER_HPP - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include "abstractrouter.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "outbound_message_handler.hpp" +#include "outbound_session_maker.hpp" +#include "rc_gossiper.hpp" +#include "rc_lookup_handler.hpp" +#include "route_poker.hpp" +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -549,5 +548,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/router_contact.cpp b/llarp/router_contact.cpp index 4162da138..e6844a69a 100644 --- a/llarp/router_contact.cpp +++ b/llarp/router_contact.cpp @@ -1,19 +1,19 @@ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "router_contact.hpp" + +#include "constants/version.hpp" +#include "crypto/crypto.hpp" +#include "net/net.hpp" +#include "util/bencode.hpp" +#include "util/buffer.hpp" +#include "util/logging/logger.hpp" +#include "util/mem.hpp" +#include "util/printer.hpp" +#include "util/time.hpp" #include #include -#include +#include "util/fs.hpp" namespace llarp { diff --git a/llarp/router_contact.hpp b/llarp/router_contact.hpp index 2fb9cbfe2..2d93ed5a8 100644 --- a/llarp/router_contact.hpp +++ b/llarp/router_contact.hpp @@ -1,14 +1,13 @@ -#ifndef LLARP_RC_HPP -#define LLARP_RC_HPP - -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include "constants/version.hpp" +#include "crypto/types.hpp" +#include "net/address_info.hpp" +#include "net/exit_info.hpp" +#include "util/aligned.hpp" +#include "util/bencode.hpp" +#include "util/status.hpp" +#include "router_version.hpp" #include #include @@ -241,5 +240,3 @@ namespace llarp using RouterLookupHandler = std::function&)>; } // namespace llarp - -#endif diff --git a/llarp/router_id.cpp b/llarp/router_id.cpp index c5141b80a..c6e3b3e33 100644 --- a/llarp/router_id.cpp +++ b/llarp/router_id.cpp @@ -1,4 +1,4 @@ -#include +#include "router_id.hpp" #include namespace llarp diff --git a/llarp/router_id.hpp b/llarp/router_id.hpp index d8ed32b2c..ccc1c74c4 100644 --- a/llarp/router_id.hpp +++ b/llarp/router_id.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_ROUTER_ID_HPP -#define LLARP_ROUTER_ID_HPP +#pragma once -#include -#include +#include "util/aligned.hpp" +#include "util/status.hpp" namespace llarp { @@ -70,4 +69,3 @@ namespace std } }; } // namespace std -#endif diff --git a/llarp/router_version.cpp b/llarp/router_version.cpp index 16118825e..33c2760f3 100644 --- a/llarp/router_version.cpp +++ b/llarp/router_version.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "router_version.hpp" +#include "constants/version.hpp" +#include "constants/proto.hpp" #include #include diff --git a/llarp/router_version.hpp b/llarp/router_version.hpp index 28412ad8d..80632c328 100644 --- a/llarp/router_version.hpp +++ b/llarp/router_version.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_ROUTER_VERSION_HPP -#define LLARP_ROUTER_VERSION_HPP +#pragma once #include -#include -#include -#include +#include "util/bencode.hpp" +#include "constants/version.hpp" +#include "constants/proto.hpp" namespace llarp { @@ -71,5 +70,3 @@ namespace llarp static const RouterVersion emptyRouterVersion({0, 0, 0}, INVALID_VERSION); } // namespace llarp - -#endif diff --git a/llarp/routing/dht_message.cpp b/llarp/routing/dht_message.cpp index 63bf4e7e6..a581e5d73 100644 --- a/llarp/routing/dht_message.cpp +++ b/llarp/routing/dht_message.cpp @@ -1,7 +1,7 @@ -#include +#include "dht_message.hpp" -#include -#include +#include +#include "handler.hpp" namespace llarp { diff --git a/llarp/routing/dht_message.hpp b/llarp/routing/dht_message.hpp index 509d5dd4c..f1d13f6b0 100644 --- a/llarp/routing/dht_message.hpp +++ b/llarp/routing/dht_message.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_MESSAGES_DHT_HPP -#define LLARP_MESSAGES_DHT_HPP +#pragma once -#include -#include +#include +#include "message.hpp" #include @@ -35,5 +34,3 @@ namespace llarp }; } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/routing/handler.hpp b/llarp/routing/handler.hpp index 008d74091..fb68aabae 100644 --- a/llarp/routing/handler.hpp +++ b/llarp/routing/handler.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_ROUTING_HANDLER_HPP -#define LLARP_ROUTING_HANDLER_HPP +#pragma once #include @@ -77,5 +76,3 @@ namespace llarp } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/routing/message.hpp b/llarp/routing/message.hpp index 1184ac9df..9b127ee8a 100644 --- a/llarp/routing/message.hpp +++ b/llarp/routing/message.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_ROUTING_MESSAGE_HPP -#define LLARP_ROUTING_MESSAGE_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include namespace llarp { @@ -38,5 +37,3 @@ namespace llarp } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/routing/message_parser.cpp b/llarp/routing/message_parser.cpp index c922748e7..b17b1665e 100644 --- a/llarp/routing/message_parser.cpp +++ b/llarp/routing/message_parser.cpp @@ -1,14 +1,14 @@ -#include +#include "message_parser.hpp" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include "dht_message.hpp" +#include "path_confirm_message.hpp" +#include "path_latency_message.hpp" +#include "path_transfer_message.hpp" +#include "transfer_traffic_message.hpp" +#include namespace llarp { diff --git a/llarp/routing/message_parser.hpp b/llarp/routing/message_parser.hpp index b0761a967..ed841875a 100644 --- a/llarp/routing/message_parser.hpp +++ b/llarp/routing/message_parser.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_ROUTING_MESSAGE_PARSER_HPP -#define LLARP_ROUTING_MESSAGE_PARSER_HPP +#pragma once -#include -#include +#include +#include #include @@ -42,4 +41,3 @@ namespace llarp }; } // namespace routing } // namespace llarp -#endif diff --git a/llarp/routing/path_confirm_message.cpp b/llarp/routing/path_confirm_message.cpp index 77184e088..98d2df876 100644 --- a/llarp/routing/path_confirm_message.cpp +++ b/llarp/routing/path_confirm_message.cpp @@ -1,8 +1,8 @@ -#include +#include "path_confirm_message.hpp" -#include -#include -#include +#include "handler.hpp" +#include +#include namespace llarp { diff --git a/llarp/routing/path_confirm_message.hpp b/llarp/routing/path_confirm_message.hpp index f2f4eae0f..9394b5687 100644 --- a/llarp/routing/path_confirm_message.hpp +++ b/llarp/routing/path_confirm_message.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_MESSAGE_PATH_CONFIRM_HPP -#define LLARP_MESSAGE_PATH_CONFIRM_HPP +#pragma once -#include +#include "message.hpp" namespace llarp { @@ -35,5 +34,3 @@ namespace llarp }; } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/routing/path_latency_message.cpp b/llarp/routing/path_latency_message.cpp index eb3dc9a1c..66099067a 100644 --- a/llarp/routing/path_latency_message.cpp +++ b/llarp/routing/path_latency_message.cpp @@ -1,7 +1,7 @@ -#include +#include "path_latency_message.hpp" -#include -#include +#include "handler.hpp" +#include namespace llarp { diff --git a/llarp/routing/path_latency_message.hpp b/llarp/routing/path_latency_message.hpp index be05fc50c..16346b969 100644 --- a/llarp/routing/path_latency_message.hpp +++ b/llarp/routing/path_latency_message.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_MESSAGES_PATH_LATENCY_HPP -#define LLARP_MESSAGES_PATH_LATENCY_HPP +#pragma once -#include +#include "message.hpp" namespace llarp { @@ -32,5 +31,3 @@ namespace llarp }; } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/routing/path_transfer_message.cpp b/llarp/routing/path_transfer_message.cpp index 4c70ddbd0..8667fbd52 100644 --- a/llarp/routing/path_transfer_message.cpp +++ b/llarp/routing/path_transfer_message.cpp @@ -1,7 +1,7 @@ -#include +#include "path_transfer_message.hpp" -#include -#include +#include "handler.hpp" +#include namespace llarp { diff --git a/llarp/routing/path_transfer_message.hpp b/llarp/routing/path_transfer_message.hpp index cb464a452..1b3186506 100644 --- a/llarp/routing/path_transfer_message.hpp +++ b/llarp/routing/path_transfer_message.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_MESSAGES_PATH_TRANSFER_HPP -#define LLARP_MESSAGES_PATH_TRANSFER_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include "message.hpp" +#include namespace llarp { @@ -44,5 +43,3 @@ namespace llarp } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/routing/transfer_traffic_message.cpp b/llarp/routing/transfer_traffic_message.cpp index 3524f2c88..580e000a7 100644 --- a/llarp/routing/transfer_traffic_message.cpp +++ b/llarp/routing/transfer_traffic_message.cpp @@ -1,8 +1,8 @@ -#include +#include "transfer_traffic_message.hpp" -#include -#include -#include +#include "handler.hpp" +#include +#include namespace llarp { diff --git a/llarp/routing/transfer_traffic_message.hpp b/llarp/routing/transfer_traffic_message.hpp index 505f350d8..6cdb0cdb5 100644 --- a/llarp/routing/transfer_traffic_message.hpp +++ b/llarp/routing/transfer_traffic_message.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_MESSAGES_TRANSFER_TRAFFIC_HPP -#define LLARP_MESSAGES_TRANSFER_TRAFFIC_HPP +#pragma once -#include -#include +#include +#include "message.hpp" #include @@ -47,5 +46,3 @@ namespace llarp }; } // namespace routing } // namespace llarp - -#endif diff --git a/llarp/rpc/endpoint_rpc.cpp b/llarp/rpc/endpoint_rpc.cpp index 873352259..c546c8f2f 100644 --- a/llarp/rpc/endpoint_rpc.cpp +++ b/llarp/rpc/endpoint_rpc.cpp @@ -1,5 +1,5 @@ #include "endpoint_rpc.hpp" -#include +#include namespace llarp::rpc { diff --git a/llarp/rpc/endpoint_rpc.hpp b/llarp/rpc/endpoint_rpc.hpp index 3e2295e1e..a7a699b28 100644 --- a/llarp/rpc/endpoint_rpc.hpp +++ b/llarp/rpc/endpoint_rpc.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include namespace llarp::service diff --git a/llarp/rpc/lokid_rpc_client.cpp b/llarp/rpc/lokid_rpc_client.cpp index 8257fb83b..25aeae61b 100644 --- a/llarp/rpc/lokid_rpc_client.cpp +++ b/llarp/rpc/lokid_rpc_client.cpp @@ -1,13 +1,13 @@ -#include +#include "lokid_rpc_client.hpp" #include -#include +#include -#include +#include #include -#include +#include namespace llarp { diff --git a/llarp/rpc/lokid_rpc_client.hpp b/llarp/rpc/lokid_rpc_client.hpp index 3aeeab496..afcca6785 100644 --- a/llarp/rpc/lokid_rpc_client.hpp +++ b/llarp/rpc/lokid_rpc_client.hpp @@ -1,12 +1,12 @@ #pragma once -#include +#include #include #include -#include -#include -#include +#include +#include +#include namespace llarp { diff --git a/llarp/rpc/rpc_server.cpp b/llarp/rpc/rpc_server.cpp index ead86a29a..666dad3ef 100644 --- a/llarp/rpc/rpc_server.cpp +++ b/llarp/rpc/rpc_server.cpp @@ -1,14 +1,14 @@ #include "rpc_server.hpp" -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include namespace llarp::rpc { diff --git a/llarp/service/address.cpp b/llarp/service/address.cpp index f566d33fd..abcdc7fdf 100644 --- a/llarp/service/address.cpp +++ b/llarp/service/address.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "address.hpp" +#include #include #include diff --git a/llarp/service/address.hpp b/llarp/service/address.hpp index fd6001473..aed9a1c79 100644 --- a/llarp/service/address.hpp +++ b/llarp/service/address.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_SERVICE_ADDRESS_HPP -#define LLARP_SERVICE_ADDRESS_HPP +#pragma once -#include -#include -#include +#include +#include +#include #include #include @@ -116,5 +115,3 @@ namespace std } }; } // namespace std - -#endif diff --git a/llarp/service/async_key_exchange.cpp b/llarp/service/async_key_exchange.cpp index 14a588f8c..43a765a75 100644 --- a/llarp/service/async_key_exchange.cpp +++ b/llarp/service/async_key_exchange.cpp @@ -1,8 +1,8 @@ -#include +#include "async_key_exchange.hpp" -#include -#include -#include +#include +#include +#include #include namespace llarp diff --git a/llarp/service/async_key_exchange.hpp b/llarp/service/async_key_exchange.hpp index cefb4986c..1bc4e68ca 100644 --- a/llarp/service/async_key_exchange.hpp +++ b/llarp/service/async_key_exchange.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_SERVICE_ASYNC_KEY_EXCHANGE_HPP -#define LLARP_SERVICE_ASYNC_KEY_EXCHANGE_HPP +#pragma once -#include -#include -#include +#include +#include "identity.hpp" +#include "protocol.hpp" namespace llarp { @@ -43,5 +42,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/auth.hpp b/llarp/service/auth.hpp index b58e16898..98e515e02 100644 --- a/llarp/service/auth.hpp +++ b/llarp/service/auth.hpp @@ -4,7 +4,7 @@ #include #include "address.hpp" #include "handler.hpp" -#include +#include namespace llarp::service { diff --git a/llarp/service/context.cpp b/llarp/service/context.cpp index 4f5d899df..3f75ca828 100644 --- a/llarp/service/context.cpp +++ b/llarp/service/context.cpp @@ -1,10 +1,10 @@ -#include +#include "context.hpp" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include "endpoint.hpp" #include namespace llarp diff --git a/llarp/service/context.hpp b/llarp/service/context.hpp index f5f17ac60..e7bbdc7dc 100644 --- a/llarp/service/context.hpp +++ b/llarp/service/context.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_SERVICE_CONTEXT_HPP -#define LLARP_SERVICE_CONTEXT_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include "endpoint.hpp" #include @@ -69,4 +68,3 @@ namespace llarp }; } // namespace service } // namespace llarp -#endif diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 1ec51864e..6d958550e 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1,32 +1,32 @@ #include #include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "endpoint.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "endpoint_state.hpp" +#include "endpoint_util.hpp" +#include "hidden_service_address_lookup.hpp" +#include "outbound_context.hpp" +#include "protocol.hpp" +#include +#include +#include +#include +#include +#include #include diff --git a/llarp/service/endpoint.hpp b/llarp/service/endpoint.hpp index 3680be09d..12e5d3567 100644 --- a/llarp/service/endpoint.hpp +++ b/llarp/service/endpoint.hpp @@ -1,26 +1,25 @@ -#ifndef LLARP_SERVICE_ENDPOINT_HPP -#define LLARP_SERVICE_ENDPOINT_HPP +#pragma once #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include +#include +#include +#include +#include +#include +#include +#include +#include "address.hpp" +#include "handler.hpp" +#include "identity.hpp" +#include "pendingbuffer.hpp" +#include "protocol.hpp" +#include "sendcontext.hpp" +#include "session.hpp" +#include "lookup.hpp" +#include +#include +#include "endpoint_types.hpp" + +#include "auth.hpp" // minimum time between introset shifts #ifndef MIN_SHIFT_INTERVAL @@ -478,5 +477,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/endpoint_state.cpp b/llarp/service/endpoint_state.cpp index 21ea82d1a..bbf307f76 100644 --- a/llarp/service/endpoint_state.cpp +++ b/llarp/service/endpoint_state.cpp @@ -1,10 +1,10 @@ -#include +#include "endpoint_state.hpp" -#include -#include -#include -#include -#include +#include +#include +#include "endpoint.hpp" +#include "outbound_context.hpp" +#include namespace llarp { diff --git a/llarp/service/endpoint_state.hpp b/llarp/service/endpoint_state.hpp index 99549d4ae..9bae738b9 100644 --- a/llarp/service/endpoint_state.hpp +++ b/llarp/service/endpoint_state.hpp @@ -1,16 +1,15 @@ -#ifndef LLARP_SERVICE_ENDPOINT_STATE_HPP -#define LLARP_SERVICE_ENDPOINT_STATE_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include "address.hpp" +#include "pendingbuffer.hpp" +#include "router_lookup_job.hpp" +#include "session.hpp" +#include "endpoint_types.hpp" +#include +#include +#include #include #include @@ -75,5 +74,3 @@ namespace llarp }; } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/endpoint_types.hpp b/llarp/service/endpoint_types.hpp index 3724927c6..07be14333 100644 --- a/llarp/service/endpoint_types.hpp +++ b/llarp/service/endpoint_types.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_SERVICE_ENDPOINT_TYPES_HPP -#define LLARP_SERVICE_ENDPOINT_TYPES_HPP +#pragma once -#include -#include -#include -#include -#include +#include "pendingbuffer.hpp" +#include "router_lookup_job.hpp" +#include "session.hpp" +#include +#include #include #include @@ -58,5 +57,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/endpoint_util.cpp b/llarp/service/endpoint_util.cpp index cc0bb9570..f84e00f52 100644 --- a/llarp/service/endpoint_util.cpp +++ b/llarp/service/endpoint_util.cpp @@ -1,9 +1,9 @@ -#include +#include "endpoint_util.hpp" -#include -#include -#include -#include +#include +#include "outbound_context.hpp" +#include "lookup.hpp" +#include namespace llarp { diff --git a/llarp/service/endpoint_util.hpp b/llarp/service/endpoint_util.hpp index bdaf62c1c..7f01a65a6 100644 --- a/llarp/service/endpoint_util.hpp +++ b/llarp/service/endpoint_util.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_SERVICE_ENDPOINT_UTIL_HPP -#define LLARP_SERVICE_ENDPOINT_UTIL_HPP +#pragma once -#include +#include "endpoint_types.hpp" namespace llarp { @@ -59,5 +58,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/handler.hpp b/llarp/service/handler.hpp index 4f7e63c5b..f5c3528e6 100644 --- a/llarp/service/handler.hpp +++ b/llarp/service/handler.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_SERVICE_HANDLER_HPP -#define LLARP_SERVICE_HANDLER_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include "intro_set.hpp" +#include #include #include @@ -94,5 +93,3 @@ namespace std } }; } // namespace std - -#endif diff --git a/llarp/service/hidden_service_address_lookup.cpp b/llarp/service/hidden_service_address_lookup.cpp index 47ac09784..0c718f272 100644 --- a/llarp/service/hidden_service_address_lookup.cpp +++ b/llarp/service/hidden_service_address_lookup.cpp @@ -1,7 +1,7 @@ -#include +#include "hidden_service_address_lookup.hpp" -#include -#include +#include +#include "endpoint.hpp" #include namespace llarp diff --git a/llarp/service/hidden_service_address_lookup.hpp b/llarp/service/hidden_service_address_lookup.hpp index c4c45ff18..bb556e233 100644 --- a/llarp/service/hidden_service_address_lookup.hpp +++ b/llarp/service/hidden_service_address_lookup.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_SERVICE_HIDDEN_SERVICE_ADDRESS_LOOKUP_HPP -#define LLARP_SERVICE_HIDDEN_SERVICE_ADDRESS_LOOKUP_HPP +#pragma once -#include -#include -#include +#include +#include "intro_set.hpp" +#include "lookup.hpp" namespace llarp { @@ -37,5 +36,3 @@ namespace llarp }; } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/identity.cpp b/llarp/service/identity.cpp index a4a97776c..362c0e56d 100644 --- a/llarp/service/identity.cpp +++ b/llarp/service/identity.cpp @@ -1,7 +1,7 @@ -#include +#include "identity.hpp" -#include -#include +#include +#include #include namespace llarp diff --git a/llarp/service/identity.hpp b/llarp/service/identity.hpp index ba8471883..7fd1b72a7 100644 --- a/llarp/service/identity.hpp +++ b/llarp/service/identity.hpp @@ -1,14 +1,13 @@ -#ifndef LLARP_SERVICE_IDENTITY_HPP -#define LLARP_SERVICE_IDENTITY_HPP +#pragma once -#include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include +#include "info.hpp" +#include "intro_set.hpp" +#include "vanity.hpp" +#include #include @@ -69,5 +68,3 @@ namespace llarp } } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/info.cpp b/llarp/service/info.cpp index 536931d04..ad5191758 100644 --- a/llarp/service/info.cpp +++ b/llarp/service/info.cpp @@ -1,8 +1,8 @@ -#include +#include "info.hpp" -#include -#include -#include +#include +#include "address.hpp" +#include #include diff --git a/llarp/service/info.hpp b/llarp/service/info.hpp index ce2a08fb5..cf9a5d757 100644 --- a/llarp/service/info.hpp +++ b/llarp/service/info.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_SERVICE_INFO_HPP -#define LLARP_SERVICE_INFO_HPP +#pragma once -#include -#include -#include -#include +#include +#include "address.hpp" +#include "vanity.hpp" +#include #include @@ -110,5 +109,3 @@ namespace llarp } } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/intro.cpp b/llarp/service/intro.cpp index 877386356..fd868ed0d 100644 --- a/llarp/service/intro.cpp +++ b/llarp/service/intro.cpp @@ -1,4 +1,4 @@ -#include +#include "intro.hpp" namespace llarp { diff --git a/llarp/service/intro.hpp b/llarp/service/intro.hpp index 48021548b..936af0738 100644 --- a/llarp/service/intro.hpp +++ b/llarp/service/intro.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_SERVICE_INTRO_HPP -#define LLARP_SERVICE_INTRO_HPP +#pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -89,5 +88,3 @@ namespace llarp } } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/intro_set.cpp b/llarp/service/intro_set.cpp index cff3f157b..4edb1b306 100644 --- a/llarp/service/intro_set.cpp +++ b/llarp/service/intro_set.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "intro_set.hpp" +#include +#include #include diff --git a/llarp/service/intro_set.hpp b/llarp/service/intro_set.hpp index 99b68b8f9..6fcb086b6 100644 --- a/llarp/service/intro_set.hpp +++ b/llarp/service/intro_set.hpp @@ -1,15 +1,14 @@ -#ifndef LLARP_SERVICE_INTRO_SET_HPP -#define LLARP_SERVICE_INTRO_SET_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include "info.hpp" +#include "intro.hpp" +#include "tag.hpp" +#include +#include +#include +#include #include #include @@ -183,5 +182,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/lookup.cpp b/llarp/service/lookup.cpp index f93048983..cf5935d5a 100644 --- a/llarp/service/lookup.cpp +++ b/llarp/service/lookup.cpp @@ -1,8 +1,8 @@ -#include +#include "lookup.hpp" -#include -#include -#include +#include +#include +#include #include namespace llarp diff --git a/llarp/service/lookup.hpp b/llarp/service/lookup.hpp index cb1cfd7a1..301cfa0a3 100644 --- a/llarp/service/lookup.hpp +++ b/llarp/service/lookup.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_SERVICE_LOOKUP_HPP -#define LLARP_SERVICE_LOOKUP_HPP +#pragma once -#include -#include -#include +#include +#include "intro_set.hpp" +#include #include @@ -94,5 +93,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/name.cpp b/llarp/service/name.cpp index 32c1e3183..ea8146abc 100644 --- a/llarp/service/name.cpp +++ b/llarp/service/name.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "name.hpp" +#include +#include namespace llarp::service { diff --git a/llarp/service/name.hpp b/llarp/service/name.hpp index def04dc5c..2f8779a4d 100644 --- a/llarp/service/name.hpp +++ b/llarp/service/name.hpp @@ -1,6 +1,6 @@ #pragma once -#include -#include +#include +#include "address.hpp" namespace llarp::service { diff --git a/llarp/service/outbound_context.cpp b/llarp/service/outbound_context.cpp index 488a908e4..28370f042 100644 --- a/llarp/service/outbound_context.cpp +++ b/llarp/service/outbound_context.cpp @@ -1,14 +1,14 @@ -#include +#include "outbound_context.hpp" -#include -#include -#include -#include -#include -#include -#include +#include +#include "async_key_exchange.hpp" +#include "hidden_service_address_lookup.hpp" +#include "endpoint.hpp" +#include +#include +#include -#include +#include "endpoint_util.hpp" #include #include diff --git a/llarp/service/outbound_context.hpp b/llarp/service/outbound_context.hpp index 6e06ad0a0..af9896463 100644 --- a/llarp/service/outbound_context.hpp +++ b/llarp/service/outbound_context.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_SERVICE_OUTBOUND_CONTEXT_HPP -#define LLARP_SERVICE_OUTBOUND_CONTEXT_HPP +#pragma once -#include -#include -#include +#include +#include "sendcontext.hpp" +#include #include #include @@ -146,4 +145,3 @@ namespace llarp } // namespace service } // namespace llarp -#endif diff --git a/llarp/service/pendingbuffer.hpp b/llarp/service/pendingbuffer.hpp index 9e0b8f4f0..ed9a71522 100644 --- a/llarp/service/pendingbuffer.hpp +++ b/llarp/service/pendingbuffer.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_SERVICE_PENDINGBUFFER_HPP -#define LLARP_SERVICE_PENDINGBUFFER_HPP +#pragma once -#include -#include +#include "protocol.hpp" +#include #include #include @@ -31,5 +30,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/protocol.cpp b/llarp/service/protocol.cpp index 888175928..7934394ef 100644 --- a/llarp/service/protocol.cpp +++ b/llarp/service/protocol.cpp @@ -1,11 +1,11 @@ -#include -#include -#include -#include -#include -#include -#include -#include +#include "protocol.hpp" +#include +#include +#include +#include +#include +#include "endpoint.hpp" +#include #include namespace llarp diff --git a/llarp/service/protocol.hpp b/llarp/service/protocol.hpp index bce5d7f05..51f126fac 100644 --- a/llarp/service/protocol.hpp +++ b/llarp/service/protocol.hpp @@ -1,18 +1,17 @@ -#ifndef LLARP_SERVICE_PROTOCOL_HPP -#define LLARP_SERVICE_PROTOCOL_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#pragma once + +#include +#include +#include +#include +#include "protocol_type.hpp" +#include "identity.hpp" +#include "info.hpp" +#include "intro.hpp" +#include "handler.hpp" +#include +#include +#include #include @@ -167,5 +166,3 @@ namespace llarp }; } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/router_lookup_job.cpp b/llarp/service/router_lookup_job.cpp index 76cae3712..517baac70 100644 --- a/llarp/service/router_lookup_job.cpp +++ b/llarp/service/router_lookup_job.cpp @@ -1,6 +1,6 @@ -#include +#include "router_lookup_job.hpp" -#include +#include "endpoint.hpp" #include namespace llarp diff --git a/llarp/service/router_lookup_job.hpp b/llarp/service/router_lookup_job.hpp index 0725ac628..58228107b 100644 --- a/llarp/service/router_lookup_job.hpp +++ b/llarp/service/router_lookup_job.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_SERVICE_ROUTER_LOOKUP_JOB_HPP -#define LLARP_SERVICE_ROUTER_LOOKUP_JOB_HPP +#pragma once -#include +#include namespace llarp { @@ -34,4 +33,3 @@ namespace llarp }; } // namespace service } // namespace llarp -#endif diff --git a/llarp/service/sendcontext.cpp b/llarp/service/sendcontext.cpp index 012b1d691..6d433b642 100644 --- a/llarp/service/sendcontext.cpp +++ b/llarp/service/sendcontext.cpp @@ -1,8 +1,8 @@ -#include +#include "sendcontext.hpp" -#include -#include -#include +#include +#include +#include "endpoint.hpp" #include #include diff --git a/llarp/service/sendcontext.hpp b/llarp/service/sendcontext.hpp index ffca55c3f..da4f19023 100644 --- a/llarp/service/sendcontext.hpp +++ b/llarp/service/sendcontext.hpp @@ -1,13 +1,12 @@ -#ifndef LLARP_SERVICE_SENDCONTEXT_HPP -#define LLARP_SERVICE_SENDCONTEXT_HPP +#pragma once -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include "intro.hpp" +#include "protocol.hpp" +#include +#include +#include #include @@ -79,5 +78,3 @@ namespace llarp }; } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/session.cpp b/llarp/service/session.cpp index 9459f88d5..1163a86c0 100644 --- a/llarp/service/session.cpp +++ b/llarp/service/session.cpp @@ -1,4 +1,4 @@ -#include +#include "session.hpp" namespace llarp { diff --git a/llarp/service/session.hpp b/llarp/service/session.hpp index f92535c11..3369e0482 100644 --- a/llarp/service/session.hpp +++ b/llarp/service/session.hpp @@ -1,12 +1,11 @@ -#ifndef LLARP_SERVICE_SESSION_HPP -#define LLARP_SERVICE_SESSION_HPP +#pragma once -#include -#include -#include -#include -#include -#include +#include +#include +#include "info.hpp" +#include "intro.hpp" +#include +#include namespace llarp { @@ -37,5 +36,3 @@ namespace llarp } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/tag.cpp b/llarp/service/tag.cpp index 508e35907..56dcdbaf0 100644 --- a/llarp/service/tag.cpp +++ b/llarp/service/tag.cpp @@ -1,4 +1,4 @@ -#include +#include "tag.hpp" namespace llarp { diff --git a/llarp/service/tag.hpp b/llarp/service/tag.hpp index 4b4f88ad7..219885af9 100644 --- a/llarp/service/tag.hpp +++ b/llarp/service/tag.hpp @@ -1,9 +1,8 @@ -#ifndef LLARP_SERVICE_TAG_HPP -#define LLARP_SERVICE_TAG_HPP +#pragma once -#include -#include -#include +#include +#include +#include #include @@ -55,5 +54,3 @@ namespace llarp }; } // namespace service } // namespace llarp - -#endif diff --git a/llarp/service/vanity.hpp b/llarp/service/vanity.hpp index 131a77037..3faf3b480 100644 --- a/llarp/service/vanity.hpp +++ b/llarp/service/vanity.hpp @@ -2,7 +2,7 @@ #ifndef LLARP_SERVICE_VANITY_HPP #define LLARP_SERVICE_VANITY_HPP -#include +#include namespace llarp { diff --git a/llarp/simulation/sim_context.cpp b/llarp/simulation/sim_context.cpp index fc1aa1626..329e8f849 100644 --- a/llarp/simulation/sim_context.cpp +++ b/llarp/simulation/sim_context.cpp @@ -1,4 +1,4 @@ -#include +#include "sim_context.hpp" #include namespace llarp diff --git a/llarp/simulation/sim_context.hpp b/llarp/simulation/sim_context.hpp index dc27cbfb2..2a6e34617 100644 --- a/llarp/simulation/sim_context.hpp +++ b/llarp/simulation/sim_context.hpp @@ -1,6 +1,6 @@ #pragma once -#include -#include +#include +#include namespace llarp { diff --git a/llarp/tooling/dht_event.hpp b/llarp/tooling/dht_event.hpp index c4dd5bb46..5c7f85611 100644 --- a/llarp/tooling/dht_event.hpp +++ b/llarp/tooling/dht_event.hpp @@ -1,9 +1,9 @@ #pragma once #include "router_event.hpp" -#include "dht/key.hpp" -#include "service/intro_set.hpp" -#include "dht/messages/findrouter.hpp" +#include +#include +#include namespace tooling { diff --git a/llarp/tooling/hive_context.cpp b/llarp/tooling/hive_context.cpp index 165c5f48d..c029d7ecb 100644 --- a/llarp/tooling/hive_context.cpp +++ b/llarp/tooling/hive_context.cpp @@ -1,6 +1,6 @@ -#include +#include "hive_context.hpp" -#include +#include "hive_router.hpp" namespace tooling { diff --git a/llarp/tooling/hive_context.hpp b/llarp/tooling/hive_context.hpp index 129f826bd..99963a90c 100644 --- a/llarp/tooling/hive_context.hpp +++ b/llarp/tooling/hive_context.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include "hive_router.hpp" namespace tooling { diff --git a/llarp/tooling/hive_router.cpp b/llarp/tooling/hive_router.cpp index 836797856..d1697560e 100644 --- a/llarp/tooling/hive_router.cpp +++ b/llarp/tooling/hive_router.cpp @@ -1,6 +1,6 @@ -#include +#include "hive_router.hpp" -#include +#include "router_hive.hpp" namespace tooling { diff --git a/llarp/tooling/hive_router.hpp b/llarp/tooling/hive_router.hpp index ce8d9c6f7..521239eb1 100644 --- a/llarp/tooling/hive_router.hpp +++ b/llarp/tooling/hive_router.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace tooling { diff --git a/llarp/tooling/path_event.hpp b/llarp/tooling/path_event.hpp index f71468269..a1fd0adf7 100644 --- a/llarp/tooling/path_event.hpp +++ b/llarp/tooling/path_event.hpp @@ -1,8 +1,8 @@ #include "router_event.hpp" -#include -#include -#include +#include +#include +#include namespace tooling { diff --git a/llarp/tooling/rc_event.hpp b/llarp/tooling/rc_event.hpp index 36f8c31d5..db23f5fe1 100644 --- a/llarp/tooling/rc_event.hpp +++ b/llarp/tooling/rc_event.hpp @@ -1,8 +1,8 @@ #pragma once -#include +#include "router_event.hpp" -#include +#include namespace tooling { diff --git a/llarp/tooling/router_event.hpp b/llarp/tooling/router_event.hpp index e5cb41c72..9c4953710 100644 --- a/llarp/tooling/router_event.hpp +++ b/llarp/tooling/router_event.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/llarp/tooling/router_hive.cpp b/llarp/tooling/router_hive.cpp index f35251876..cc8d40efa 100644 --- a/llarp/tooling/router_hive.cpp +++ b/llarp/tooling/router_hive.cpp @@ -1,9 +1,9 @@ -#include +#include "router_hive.hpp" -#include "llarp.h" -#include "llarp.hpp" -#include "util/str.hpp" -#include "router/abstractrouter.hpp" +#include +#include +#include +#include #include #include diff --git a/llarp/tooling/router_hive.hpp b/llarp/tooling/router_hive.hpp index 8cb8fa37b..5428bb790 100644 --- a/llarp/tooling/router_hive.hpp +++ b/llarp/tooling/router_hive.hpp @@ -1,10 +1,10 @@ #pragma once -#include +#include "router_event.hpp" #include -#include -#include +#include +#include "hive_context.hpp" #include #include diff --git a/llarp/util/aligned.hpp b/llarp/util/aligned.hpp index e8e581867..aba9b83e7 100644 --- a/llarp/util/aligned.hpp +++ b/llarp/util/aligned.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_ALIGNED_HPP -#define LLARP_ALIGNED_HPP +#pragma once -#include -#include -#include -#include +#include "bencode.h" +#include +#include +#include "printer.hpp" #include @@ -305,5 +304,3 @@ namespace llarp Data m_data; }; } // namespace llarp - -#endif diff --git a/llarp/util/bencode.cpp b/llarp/util/bencode.cpp index 23f906551..2ff9bc567 100644 --- a/llarp/util/bencode.cpp +++ b/llarp/util/bencode.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "bencode.hpp" +#include #include #include #include diff --git a/llarp/util/bencode.h b/llarp/util/bencode.h index 07a612338..fb6940d6a 100644 --- a/llarp/util/bencode.h +++ b/llarp/util/bencode.h @@ -1,9 +1,8 @@ -#ifndef LLARP_BENCODE_H -#define LLARP_BENCODE_H +#pragma once -#include -#include -#include +#include +#include "buffer.hpp" +#include "common.hpp" #include @@ -45,5 +44,3 @@ bencode_end(llarp_buffer_t* buff); /// read next member, discard it and advance buffer bool bencode_discard(llarp_buffer_t* buf); - -#endif diff --git a/llarp/util/bencode.hpp b/llarp/util/bencode.hpp index a1c28336f..c7bebbcbc 100644 --- a/llarp/util/bencode.hpp +++ b/llarp/util/bencode.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_BENCODE_HPP -#define LLARP_BENCODE_HPP +#pragma once -#include -#include -#include -#include -#include +#include "buffer.hpp" +#include "bencode.h" +#include "fs.hpp" +#include +#include "mem.hpp" #include #include @@ -360,5 +359,3 @@ namespace llarp } } // namespace llarp - -#endif diff --git a/llarp/util/bits.hpp b/llarp/util/bits.hpp index aa0066b68..5aae7e47c 100644 --- a/llarp/util/bits.hpp +++ b/llarp/util/bits.hpp @@ -1,13 +1,12 @@ -#ifndef LLARP_BITS_HPP -#define LLARP_BITS_HPP +#pragma once #include #include #include #include #include -#include -#include +#include +#include namespace llarp { @@ -72,5 +71,3 @@ namespace llarp } } // namespace bits } // namespace llarp - -#endif diff --git a/llarp/util/buffer.cpp b/llarp/util/buffer.cpp index c074bfded..62c516646 100644 --- a/llarp/util/buffer.cpp +++ b/llarp/util/buffer.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "buffer.hpp" +#include "endian.hpp" #include #include diff --git a/llarp/util/buffer.hpp b/llarp/util/buffer.hpp index 289370a4f..4f7311043 100644 --- a/llarp/util/buffer.hpp +++ b/llarp/util/buffer.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_BUFFER_HPP -#define LLARP_BUFFER_HPP +#pragma once #include -#include -#include -#include +#include "common.hpp" +#include "mem.h" +#include "types.hpp" #include #include @@ -272,5 +271,3 @@ namespace llarp }; } // namespace llarp - -#endif diff --git a/llarp/util/codel.hpp b/llarp/util/codel.hpp index 07d96c9a1..a18be23c2 100644 --- a/llarp/util/codel.hpp +++ b/llarp/util/codel.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_CODEL_QUEUE_HPP -#define LLARP_CODEL_QUEUE_HPP +#pragma once -#include -#include -#include -#include +#include +#include "mem.hpp" +#include +#include "time.hpp" #include #include @@ -166,5 +165,3 @@ namespace llarp }; // namespace util } // namespace util } // namespace llarp - -#endif diff --git a/llarp/util/common.hpp b/llarp/util/common.hpp index 4223ebf52..43b471b4f 100644 --- a/llarp/util/common.hpp +++ b/llarp/util/common.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_COMMON_HPP -#define LLARP_COMMON_HPP +#pragma once #ifdef __STRICT_ANSI__ #define INLINE __inline__ #else @@ -8,4 +7,3 @@ #include #include -#endif diff --git a/llarp/util/compare_ptr.hpp b/llarp/util/compare_ptr.hpp index 8c5141f36..e203688b9 100644 --- a/llarp/util/compare_ptr.hpp +++ b/llarp/util/compare_ptr.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_UTIL_COMPARE_PTR_HPP -#define LLARP_UTIL_COMPARE_PTR_HPP +#pragma once #include namespace llarp @@ -18,5 +17,3 @@ namespace llarp } }; } // namespace llarp - -#endif diff --git a/llarp/util/copy_or_nullptr.hpp b/llarp/util/copy_or_nullptr.hpp index 752075407..86c42d1fa 100644 --- a/llarp/util/copy_or_nullptr.hpp +++ b/llarp/util/copy_or_nullptr.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_UTIL_COPY_OR_NULLPTR_HPP -#define LLARP_UTIL_COPY_OR_NULLPTR_HPP +#pragma once #include template @@ -10,5 +9,3 @@ copy_or_nullptr(const std::unique_ptr& other) return std::make_unique(*other); return nullptr; } - -#endif \ No newline at end of file diff --git a/llarp/util/decaying_hashset.hpp b/llarp/util/decaying_hashset.hpp index 8607832e5..a941440f5 100644 --- a/llarp/util/decaying_hashset.hpp +++ b/llarp/util/decaying_hashset.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_UTIL_DECAYING_HASHSET_HPP -#define LLARP_UTIL_DECAYING_HASHSET_HPP +#pragma once -#include +#include "time.hpp" #include namespace llarp @@ -82,5 +81,3 @@ namespace llarp }; } // namespace util } // namespace llarp - -#endif diff --git a/llarp/util/decaying_hashtable.hpp b/llarp/util/decaying_hashtable.hpp index 0c6313ebb..2f7ea7c03 100644 --- a/llarp/util/decaying_hashtable.hpp +++ b/llarp/util/decaying_hashtable.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include "time.hpp" #include namespace llarp::util diff --git a/llarp/util/endian.hpp b/llarp/util/endian.hpp index 3ff140386..eb2b534c7 100644 --- a/llarp/util/endian.hpp +++ b/llarp/util/endian.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_ENDIAN_HPP -#define LLARP_ENDIAN_HPP +#pragma once // adapted from libi2pd @@ -202,5 +201,3 @@ htole64buf(void* buf, uint64_t big64) { htobuf64(buf, htole64(big64)); } - -#endif diff --git a/llarp/util/fs.cpp b/llarp/util/fs.cpp index 30aa148e2..187ea2228 100644 --- a/llarp/util/fs.cpp +++ b/llarp/util/fs.cpp @@ -1,6 +1,6 @@ -#include +#include "fs.hpp" -#include +#include #include #include diff --git a/llarp/util/fs.hpp b/llarp/util/fs.hpp index 96fe3bee8..d588292ea 100644 --- a/llarp/util/fs.hpp +++ b/llarp/util/fs.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_FS_HPP -#define LLARP_FS_HPP +#pragma once #include @@ -90,4 +89,3 @@ namespace llarp }; } // namespace util } // namespace llarp -#endif // end LLARP_FS_HPP diff --git a/llarp/util/json.cpp b/llarp/util/json.cpp index 6c77f63ef..da7989258 100644 --- a/llarp/util/json.cpp +++ b/llarp/util/json.cpp @@ -1,4 +1,4 @@ -#include +#include "json.hpp" #include #include diff --git a/llarp/util/json.hpp b/llarp/util/json.hpp index ea4cda5a6..8e7bf5899 100644 --- a/llarp/util/json.hpp +++ b/llarp/util/json.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_UTIL_JSON_HPP -#define LLARP_UTIL_JSON_HPP +#pragma once #include @@ -41,5 +40,3 @@ namespace llarp } // namespace json } // namespace llarp - -#endif diff --git a/llarp/util/logging/android_logger.cpp b/llarp/util/logging/android_logger.cpp index 251593ba4..c9d9de01f 100644 --- a/llarp/util/logging/android_logger.cpp +++ b/llarp/util/logging/android_logger.cpp @@ -1,7 +1,7 @@ #if defined(ANDROID) -#include -#include +#include "android_logger.hpp" +#include "logger_internal.hpp" #include namespace llarp diff --git a/llarp/util/logging/android_logger.hpp b/llarp/util/logging/android_logger.hpp index 3069928a5..15345776e 100644 --- a/llarp/util/logging/android_logger.hpp +++ b/llarp/util/logging/android_logger.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_UTIL_ANDROID_LOGGER_HPP -#define LLARP_UTIL_ANDROID_LOGGER_HPP +#pragma once -#include +#include "logstream.hpp" #include @@ -29,5 +28,3 @@ namespace llarp ImmediateFlush() override{}; }; } // namespace llarp - -#endif diff --git a/llarp/util/logging/file_logger.cpp b/llarp/util/logging/file_logger.cpp index 704e615aa..229b9c148 100644 --- a/llarp/util/logging/file_logger.cpp +++ b/llarp/util/logging/file_logger.cpp @@ -1,7 +1,7 @@ #include -#include -#include -#include +#include "file_logger.hpp" +#include "logger_internal.hpp" +#include #include diff --git a/llarp/util/logging/file_logger.hpp b/llarp/util/logging/file_logger.hpp index 15ce24ceb..7b6bfbd49 100644 --- a/llarp/util/logging/file_logger.hpp +++ b/llarp/util/logging/file_logger.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_UTIL_FILE_LOGGER_HPP -#define LLARP_UTIL_FILE_LOGGER_HPP +#pragma once -#include +#include "logstream.hpp" -#include -#include +#include +#include #include @@ -70,5 +69,3 @@ namespace llarp const bool m_Close; }; } // namespace llarp - -#endif diff --git a/llarp/util/logging/json_logger.cpp b/llarp/util/logging/json_logger.cpp index dbae769a9..119e910f3 100644 --- a/llarp/util/logging/json_logger.cpp +++ b/llarp/util/logging/json_logger.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "json_logger.hpp" +#include namespace llarp { diff --git a/llarp/util/logging/json_logger.hpp b/llarp/util/logging/json_logger.hpp index 556d773fa..af0476b6f 100644 --- a/llarp/util/logging/json_logger.hpp +++ b/llarp/util/logging/json_logger.hpp @@ -1,7 +1,7 @@ #ifndef LLARP_UTIL_JSON_LOGGER #define LLARP_UTIL_JSON_LOGGER -#include +#include "file_logger.hpp" namespace llarp { diff --git a/llarp/util/logging/logger.cpp b/llarp/util/logging/logger.cpp index 003a3af0e..908ffb8e0 100644 --- a/llarp/util/logging/logger.cpp +++ b/llarp/util/logging/logger.cpp @@ -1,16 +1,16 @@ -#include -#include -#include -#include -#include +#include "logger.hpp" +#include "ostream_logger.hpp" +#include "logger_syslog.hpp" +#include "file_logger.hpp" +#include "json_logger.hpp" #if defined(_WIN32) -#include +#include "win32_logger.hpp" #endif #if defined(ANDROID) -#include +#include "android_logger.hpp" #endif -#include +#include #include diff --git a/llarp/util/logging/logger.hpp b/llarp/util/logging/logger.hpp index a8375fdc3..352526d2c 100644 --- a/llarp/util/logging/logger.hpp +++ b/llarp/util/logging/logger.hpp @@ -1,10 +1,9 @@ -#ifndef LLARP_UTIL_LOGGER_HPP -#define LLARP_UTIL_LOGGER_HPP +#pragma once #include -#include -#include -#include +#include +#include "logstream.hpp" +#include "logger_internal.hpp" namespace llarp { @@ -115,5 +114,3 @@ namespace llarp #ifndef LOG_TAG #define LOG_TAG "default" #endif - -#endif diff --git a/llarp/util/logging/logger_internal.cpp b/llarp/util/logging/logger_internal.cpp index 0846b2e5a..2cff1a9a1 100644 --- a/llarp/util/logging/logger_internal.cpp +++ b/llarp/util/logging/logger_internal.cpp @@ -1,4 +1,4 @@ -#include +#include "logger_internal.hpp" #include diff --git a/llarp/util/logging/logger_internal.hpp b/llarp/util/logging/logger_internal.hpp index 35c178ae1..373194432 100644 --- a/llarp/util/logging/logger_internal.hpp +++ b/llarp/util/logging/logger_internal.hpp @@ -1,11 +1,10 @@ -#ifndef LLARP_UTIL_LOGGER_INTERNAL_HPP -#define LLARP_UTIL_LOGGER_INTERNAL_HPP +#pragma once -#include +#include #include #include -#include +#include namespace llarp { @@ -52,5 +51,3 @@ namespace llarp operator<<(std::ostream& out, const log_timestamp& ts); } // namespace llarp - -#endif diff --git a/llarp/util/logging/logger_syslog.hpp b/llarp/util/logging/logger_syslog.hpp index 455c4dbae..71d436451 100644 --- a/llarp/util/logging/logger_syslog.hpp +++ b/llarp/util/logging/logger_syslog.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_UTIL_LOGGER_SYSLOG_HPP -#define LLARP_UTIL_LOGGER_SYSLOG_HPP +#pragma once -#include +#include "logstream.hpp" #include namespace llarp @@ -30,4 +29,3 @@ namespace llarp {} }; } // namespace llarp -#endif diff --git a/llarp/util/logging/loglevel.cpp b/llarp/util/logging/loglevel.cpp index 2bab4606e..4faf02d19 100644 --- a/llarp/util/logging/loglevel.cpp +++ b/llarp/util/logging/loglevel.cpp @@ -1,4 +1,4 @@ -#include +#include "loglevel.hpp" #include #include diff --git a/llarp/util/logging/loglevel.hpp b/llarp/util/logging/loglevel.hpp index eab3982fb..adf99f313 100644 --- a/llarp/util/logging/loglevel.hpp +++ b/llarp/util/logging/loglevel.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_UTIL_LOG_LEVEL_HPP -#define LLARP_UTIL_LOG_LEVEL_HPP +#pragma once #include #include @@ -26,5 +25,3 @@ namespace llarp LogLevelFromString(std::string level); } // namespace llarp - -#endif diff --git a/llarp/util/logging/logstream.hpp b/llarp/util/logging/logstream.hpp index bfc8a048d..e7b0767a4 100644 --- a/llarp/util/logging/logstream.hpp +++ b/llarp/util/logging/logstream.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_UTIL_LOG_STREAM_HPP -#define LLARP_UTIL_LOG_STREAM_HPP -#include +#pragma once +#include "loglevel.hpp" -#include +#include #include #include @@ -56,4 +55,3 @@ namespace llarp using ILogStream_ptr = std::unique_ptr; } // namespace llarp -#endif diff --git a/llarp/util/logging/ostream_logger.cpp b/llarp/util/logging/ostream_logger.cpp index f6c85bf61..2b81fbc7f 100644 --- a/llarp/util/logging/ostream_logger.cpp +++ b/llarp/util/logging/ostream_logger.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "ostream_logger.hpp" +#include "logger_internal.hpp" namespace llarp { diff --git a/llarp/util/logging/ostream_logger.hpp b/llarp/util/logging/ostream_logger.hpp index 4a4aa847d..fa92ab988 100644 --- a/llarp/util/logging/ostream_logger.hpp +++ b/llarp/util/logging/ostream_logger.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_UTIL_OSTREAM_LOGGER_HPP -#define LLARP_UTIL_OSTREAM_LOGGER_HPP +#pragma once -#include +#include "logstream.hpp" #include namespace llarp @@ -37,5 +36,3 @@ namespace llarp std::ostream& m_Out; }; } // namespace llarp - -#endif diff --git a/llarp/util/logging/syslog_logger.cpp b/llarp/util/logging/syslog_logger.cpp index b87878104..4c98fe0d9 100644 --- a/llarp/util/logging/syslog_logger.cpp +++ b/llarp/util/logging/syslog_logger.cpp @@ -1,7 +1,7 @@ #ifndef _WIN32 -#include +#include "logger_syslog.hpp" -#include +#include "logger_internal.hpp" #include namespace llarp diff --git a/llarp/util/logging/win32_logger.cpp b/llarp/util/logging/win32_logger.cpp index 8ed0d9bc4..ee155bb30 100644 --- a/llarp/util/logging/win32_logger.cpp +++ b/llarp/util/logging/win32_logger.cpp @@ -1,6 +1,6 @@ #if defined(_WIN32) -#include -#include +#include "win32_logger.hpp" +#include "logger_internal.hpp" static CONSOLE_SCREEN_BUFFER_INFO consoleInfo; static short old_attrs; diff --git a/llarp/util/logging/win32_logger.hpp b/llarp/util/logging/win32_logger.hpp index 6a259458d..df9e99427 100644 --- a/llarp/util/logging/win32_logger.hpp +++ b/llarp/util/logging/win32_logger.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_UTIL_WIN32_LOGGER_HPP -#define LLARP_UTIL_WIN32_LOGGER_HPP +#pragma once #if defined(_WIN32) -#include +#include "ostream_logger.hpp" #define VC_EXTRALEAN #include @@ -36,4 +35,3 @@ namespace llarp }; } // namespace llarp #endif -#endif diff --git a/llarp/util/lokinet_init.c b/llarp/util/lokinet_init.c index ea1892916..62fb3f7b2 100644 --- a/llarp/util/lokinet_init.c +++ b/llarp/util/lokinet_init.c @@ -1,4 +1,4 @@ -#include +#include "lokinet_init.h" #if defined(_WIN32) #include #include diff --git a/llarp/util/lokinet_init.h b/llarp/util/lokinet_init.h index d63cdba2a..42154facc 100644 --- a/llarp/util/lokinet_init.h +++ b/llarp/util/lokinet_init.h @@ -1,5 +1,4 @@ -#ifndef LLARP_UTIL_LOKINET_INIT_H -#define LLARP_UTIL_LOKINET_INIT_H +#pragma once #ifdef __cplusplus extern "C" @@ -21,4 +20,3 @@ extern "C" #ifdef __cplusplus } #endif -#endif \ No newline at end of file diff --git a/llarp/util/mem.cpp b/llarp/util/mem.cpp index e2641226b..1fe7a389c 100644 --- a/llarp/util/mem.cpp +++ b/llarp/util/mem.cpp @@ -1,5 +1,5 @@ #define NO_JEMALLOC -#include +#include "mem.h" #include namespace llarp diff --git a/llarp/util/mem.h b/llarp/util/mem.h index af0918122..78fbe5c3a 100644 --- a/llarp/util/mem.h +++ b/llarp/util/mem.h @@ -1,5 +1,4 @@ -#ifndef LLARP_MEM_H_ -#define LLARP_MEM_H_ +#pragma once #include #include @@ -7,5 +6,3 @@ /** constant time memcmp */ bool llarp_eq(const void* a, const void* b, size_t sz); - -#endif diff --git a/llarp/util/mem.hpp b/llarp/util/mem.hpp index 8ab179b8e..58762df52 100644 --- a/llarp/util/mem.hpp +++ b/llarp/util/mem.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_MEM_HPP -#define LLARP_MEM_HPP +#pragma once -#include -#include +#include "buffer.hpp" +#include "mem.h" #include #include @@ -92,5 +91,3 @@ namespace llarp } } // namespace llarp - -#endif diff --git a/llarp/util/meta/traits.hpp b/llarp/util/meta/traits.hpp index 64fbbd0fb..240ec277a 100644 --- a/llarp/util/meta/traits.hpp +++ b/llarp/util/meta/traits.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_TRAITS_HPP -#define LLARP_TRAITS_HPP +#pragma once #include #include @@ -208,5 +207,3 @@ namespace llarp } // namespace traits } // namespace llarp - -#endif diff --git a/llarp/util/printer.cpp b/llarp/util/printer.cpp index a4e56f487..7fe226f29 100644 --- a/llarp/util/printer.cpp +++ b/llarp/util/printer.cpp @@ -1,4 +1,4 @@ -#include +#include "printer.hpp" #include diff --git a/llarp/util/printer.hpp b/llarp/util/printer.hpp index 95f223f92..b545c920f 100644 --- a/llarp/util/printer.hpp +++ b/llarp/util/printer.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_PRINTER_HPP -#define LLARP_PRINTER_HPP +#pragma once -#include +#include #include #include @@ -582,5 +581,3 @@ namespace llarp } } // namespace llarp - -#endif diff --git a/llarp/util/status.hpp b/llarp/util/status.hpp index 3af0cd4fd..834f8685b 100644 --- a/llarp/util/status.hpp +++ b/llarp/util/status.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_UTIL_STATUS_HPP -#define LLARP_UTIL_STATUS_HPP +#pragma once #include @@ -10,5 +9,3 @@ namespace llarp using StatusObject = nlohmann::json; } // namespace util } // namespace llarp - -#endif diff --git a/llarp/util/str.cpp b/llarp/util/str.cpp index 3d75c6f40..a87cfd9ed 100644 --- a/llarp/util/str.cpp +++ b/llarp/util/str.cpp @@ -1,4 +1,4 @@ -#include +#include "str.hpp" #include #include diff --git a/llarp/util/str.hpp b/llarp/util/str.hpp index 6e2e62201..ab6e4588d 100644 --- a/llarp/util/str.hpp +++ b/llarp/util/str.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_STR_HPP -#define LLARP_STR_HPP +#pragma once #include #include @@ -155,5 +154,3 @@ namespace llarp friendly_duration(std::chrono::nanoseconds dur); } // namespace llarp - -#endif diff --git a/llarp/util/thread/queue.hpp b/llarp/util/thread/queue.hpp index ff8a1f0cc..96e6c158e 100644 --- a/llarp/util/thread/queue.hpp +++ b/llarp/util/thread/queue.hpp @@ -1,8 +1,7 @@ -#ifndef LLARP_QUEUE_HPP -#define LLARP_QUEUE_HPP +#pragma once -#include -#include +#include "queue_manager.hpp" +#include "threading.hpp" #include #include @@ -561,5 +560,3 @@ namespace llarp } // namespace thread } // namespace llarp - -#endif diff --git a/llarp/util/thread/queue_manager.cpp b/llarp/util/thread/queue_manager.cpp index 365af23c0..e47d77b9b 100644 --- a/llarp/util/thread/queue_manager.cpp +++ b/llarp/util/thread/queue_manager.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "queue_manager.hpp" +#include "threading.hpp" #include diff --git a/llarp/util/thread/queue_manager.hpp b/llarp/util/thread/queue_manager.hpp index 102f7e0d9..9761b1012 100644 --- a/llarp/util/thread/queue_manager.hpp +++ b/llarp/util/thread/queue_manager.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_QUEUE_MANAGER_HPP -#define LLARP_QUEUE_MANAGER_HPP +#pragma once #include #include @@ -208,4 +207,3 @@ namespace llarp }; } // namespace thread } // namespace llarp -#endif diff --git a/llarp/util/thread/threading.cpp b/llarp/util/thread/threading.cpp index 58675d99a..826177ef9 100644 --- a/llarp/util/thread/threading.cpp +++ b/llarp/util/thread/threading.cpp @@ -1,6 +1,6 @@ -#include +#include "threading.hpp" -#include +#include #include #ifdef POSIX diff --git a/llarp/util/thread/threading.hpp b/llarp/util/thread/threading.hpp index d1ac6edb8..4afdb0eb3 100644 --- a/llarp/util/thread/threading.hpp +++ b/llarp/util/thread/threading.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_THREADING_HPP -#define LLARP_THREADING_HPP +#pragma once #include #include @@ -21,7 +20,7 @@ using pid_t = int; #endif #ifdef TRACY_ENABLE -#include "Tracy.hpp" +#include #define DECLARE_LOCK(type, var, ...) TracyLockable(type, var) #else #define DECLARE_LOCK(type, var, ...) type var __VA_ARGS__ @@ -181,5 +180,3 @@ namespace llarp }; } // namespace util } // namespace llarp - -#endif diff --git a/llarp/util/time.cpp b/llarp/util/time.cpp index 83cbaaed5..dbdc0858e 100644 --- a/llarp/util/time.cpp +++ b/llarp/util/time.cpp @@ -1,6 +1,6 @@ -#include +#include "time.hpp" #include -#include +#include namespace llarp { diff --git a/llarp/util/time.hpp b/llarp/util/time.hpp index 61217d050..f248af948 100644 --- a/llarp/util/time.hpp +++ b/llarp/util/time.hpp @@ -1,7 +1,6 @@ -#ifndef LLARP_TIME_HPP -#define LLARP_TIME_HPP +#pragma once -#include +#include "types.hpp" #include using namespace std::chrono_literals; @@ -19,5 +18,3 @@ namespace llarp to_json(const llarp_time_t& t); } // namespace llarp - -#endif diff --git a/llarp/util/types.hpp b/llarp/util/types.hpp index cb3b237d8..6538ad048 100644 --- a/llarp/util/types.hpp +++ b/llarp/util/types.hpp @@ -1,5 +1,4 @@ -#ifndef LLARP_TYPES_H -#define LLARP_TYPES_H +#pragma once #include #include #include @@ -13,5 +12,3 @@ namespace llarp { using namespace std::literals; } - -#endif diff --git a/llarp/vpn/android.hpp b/llarp/vpn/android.hpp index 210d05d7c..b2c3ef5b3 100644 --- a/llarp/vpn/android.hpp +++ b/llarp/vpn/android.hpp @@ -3,8 +3,8 @@ #include #include -#include -#include +#include +#include "common.hpp" #include namespace llarp::vpn diff --git a/llarp/vpn/apple.hpp b/llarp/vpn/apple.hpp index 242a4d3a4..f20c50ce3 100644 --- a/llarp/vpn/apple.hpp +++ b/llarp/vpn/apple.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include "common.hpp" #include #include diff --git a/llarp/vpn/linux.hpp b/llarp/vpn/linux.hpp index c34657362..78255a21c 100644 --- a/llarp/vpn/linux.hpp +++ b/llarp/vpn/linux.hpp @@ -1,11 +1,11 @@ #pragma once -#include +#include #include #include #include #include -#include +#include "common.hpp" #include #include diff --git a/llarp/vpn/packet_router.cpp b/llarp/vpn/packet_router.cpp index aca5a5060..54c1839e9 100644 --- a/llarp/vpn/packet_router.cpp +++ b/llarp/vpn/packet_router.cpp @@ -1,4 +1,4 @@ -#include +#include "packet_router.hpp" namespace llarp::vpn { diff --git a/llarp/vpn/packet_router.hpp b/llarp/vpn/packet_router.hpp index 6d5bdf9a1..e84454eae 100644 --- a/llarp/vpn/packet_router.hpp +++ b/llarp/vpn/packet_router.hpp @@ -1,6 +1,6 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/llarp/vpn/platform.cpp b/llarp/vpn/platform.cpp index f4759f92b..0784ba110 100644 --- a/llarp/vpn/platform.cpp +++ b/llarp/vpn/platform.cpp @@ -1,15 +1,15 @@ #ifdef _WIN32 -#include +#include "win32.hpp" #endif #ifdef __linux__ #ifdef ANDROID -#include +#include "android.hpp" #else -#include +#include "linux.hpp" #endif #endif #ifdef __APPLE__ -#include +#include "apple.hpp" #endif namespace llarp::vpn diff --git a/llarp/vpn/win32.hpp b/llarp/vpn/win32.hpp index e21c8bad7..405cfabe1 100644 --- a/llarp/vpn/win32.hpp +++ b/llarp/vpn/win32.hpp @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include // DDK macros #define CTL_CODE(DeviceType, Function, Method, Access) \ diff --git a/llarp/win32/win32_inet.c b/llarp/win32/win32_inet.c index c8a9f3be7..394923bb3 100644 --- a/llarp/win32/win32_inet.c +++ b/llarp/win32/win32_inet.c @@ -11,7 +11,7 @@ // these need to be in a specific order #include #include -#include +#include #include #include diff --git a/llarp/win32/win32_intrnl.c b/llarp/win32/win32_intrnl.c index f69c86658..8bdf2baa3 100644 --- a/llarp/win32/win32_intrnl.c +++ b/llarp/win32/win32_intrnl.c @@ -168,4 +168,4 @@ LONG FAR PASCAL win32_signal_handler(EXCEPTION_POINTERS *e) return 0; } #endif -#endif \ No newline at end of file +#endif diff --git a/pybind/common.hpp b/pybind/common.hpp index 6d1508882..83769d2c7 100644 --- a/pybind/common.hpp +++ b/pybind/common.hpp @@ -5,7 +5,7 @@ #include -#include +#include namespace py = pybind11; diff --git a/pybind/llarp/config.cpp b/pybind/llarp/config.cpp index 188760b77..0ce603c2d 100644 --- a/pybind/llarp/config.cpp +++ b/pybind/llarp/config.cpp @@ -1,5 +1,5 @@ -#include "common.hpp" -#include "config/config.hpp" +#include +#include #include diff --git a/pybind/llarp/context.cpp b/pybind/llarp/context.cpp index b15b67bae..6ebcf97d4 100644 --- a/pybind/llarp/context.cpp +++ b/pybind/llarp/context.cpp @@ -1,8 +1,8 @@ -#include "common.hpp" +#include #include -#include -#include -#include "llarp/handlers/pyhandler.hpp" +#include +#include +#include namespace llarp { void diff --git a/pybind/llarp/crypto/types.cpp b/pybind/llarp/crypto/types.cpp index 0cc496c2e..ffbaaf44b 100644 --- a/pybind/llarp/crypto/types.cpp +++ b/pybind/llarp/crypto/types.cpp @@ -1,5 +1,5 @@ -#include -#include "common.hpp" +#include +#include namespace llarp { diff --git a/pybind/llarp/dht/dht_types.cpp b/pybind/llarp/dht/dht_types.cpp index ccc5bdf88..b374197ef 100644 --- a/pybind/llarp/dht/dht_types.cpp +++ b/pybind/llarp/dht/dht_types.cpp @@ -1,6 +1,6 @@ -#include +#include -#include "common.hpp" +#include #include namespace llarp diff --git a/pybind/llarp/handlers/pyhandler.cpp b/pybind/llarp/handlers/pyhandler.cpp index e12d63e2b..5d3c41b36 100644 --- a/pybind/llarp/handlers/pyhandler.cpp +++ b/pybind/llarp/handlers/pyhandler.cpp @@ -1,4 +1,4 @@ -#include "llarp/handlers/pyhandler.hpp" +#include namespace llarp { namespace handlers diff --git a/pybind/llarp/handlers/pyhandler.hpp b/pybind/llarp/handlers/pyhandler.hpp index cfbeb8526..871981dc0 100644 --- a/pybind/llarp/handlers/pyhandler.hpp +++ b/pybind/llarp/handlers/pyhandler.hpp @@ -1,9 +1,9 @@ #pragma once -#include "common.hpp" -#include "llarp.hpp" -#include "service/context.hpp" -#include "service/endpoint.hpp" -#include "router/abstractrouter.hpp" +#include +#include +#include +#include +#include namespace llarp { diff --git a/pybind/llarp/logger.cpp b/pybind/llarp/logger.cpp index ea92324c4..3df7bea93 100644 --- a/pybind/llarp/logger.cpp +++ b/pybind/llarp/logger.cpp @@ -1,6 +1,6 @@ -#include "common.hpp" +#include #include -#include +#include namespace llarp { diff --git a/pybind/llarp/path/path_hop_config.cpp b/pybind/llarp/path/path_hop_config.cpp index f40585b97..7a539e4c9 100644 --- a/pybind/llarp/path/path_hop_config.cpp +++ b/pybind/llarp/path/path_hop_config.cpp @@ -1,5 +1,5 @@ -#include -#include "common.hpp" +#include +#include namespace llarp { diff --git a/pybind/llarp/path/path_types.cpp b/pybind/llarp/path/path_types.cpp index de0633c9a..9528bd4d8 100644 --- a/pybind/llarp/path/path_types.cpp +++ b/pybind/llarp/path/path_types.cpp @@ -1,6 +1,6 @@ -#include +#include -#include "common.hpp" +#include #include namespace llarp diff --git a/pybind/llarp/peerstats.cpp b/pybind/llarp/peerstats.cpp index eebca2059..9ce84d13a 100644 --- a/pybind/llarp/peerstats.cpp +++ b/pybind/llarp/peerstats.cpp @@ -1,7 +1,7 @@ -#include "common.hpp" -#include "config/config.hpp" -#include "peerstats/peer_db.hpp" -#include "peerstats/types.hpp" +#include +#include +#include +#include #include diff --git a/pybind/llarp/router.cpp b/pybind/llarp/router.cpp index 778f566c3..04fe8b0bc 100644 --- a/pybind/llarp/router.cpp +++ b/pybind/llarp/router.cpp @@ -1,7 +1,7 @@ -#include "common.hpp" +#include -#include "router/abstractrouter.hpp" -#include "tooling/hive_router.hpp" +#include +#include namespace llarp { diff --git a/pybind/llarp/router_contact.cpp b/pybind/llarp/router_contact.cpp index c3fd75881..e80fc2ee2 100644 --- a/pybind/llarp/router_contact.cpp +++ b/pybind/llarp/router_contact.cpp @@ -1,6 +1,6 @@ -#include -#include -#include "common.hpp" +#include +#include +#include namespace llarp { diff --git a/pybind/llarp/router_id.cpp b/pybind/llarp/router_id.cpp index 5e6cc63bf..2612c531f 100644 --- a/pybind/llarp/router_id.cpp +++ b/pybind/llarp/router_id.cpp @@ -1,6 +1,6 @@ -#include "common.hpp" +#include -#include "router_id.hpp" +#include namespace llarp { diff --git a/pybind/llarp/service/address.cpp b/pybind/llarp/service/address.cpp index e7e1ce361..276911c08 100644 --- a/pybind/llarp/service/address.cpp +++ b/pybind/llarp/service/address.cpp @@ -1,5 +1,5 @@ -#include "common.hpp" -#include "service/address.hpp" +#include +#include namespace llarp { @@ -13,4 +13,4 @@ namespace llarp .def("__str__", [](const Address& addr) -> std::string { return addr.ToString(); }); } } // namespace service -} // namespace llarp \ No newline at end of file +} // namespace llarp diff --git a/pybind/llarp/tooling/peer_stats_event.hpp b/pybind/llarp/tooling/peer_stats_event.hpp index 860632544..707c7fe54 100644 --- a/pybind/llarp/tooling/peer_stats_event.hpp +++ b/pybind/llarp/tooling/peer_stats_event.hpp @@ -1,6 +1,6 @@ #pragma once -#include "router_event.hpp" +#include namespace tooling { diff --git a/pybind/llarp/tooling/router_event.cpp b/pybind/llarp/tooling/router_event.cpp index 3fe62db18..73a110aaa 100644 --- a/pybind/llarp/tooling/router_event.cpp +++ b/pybind/llarp/tooling/router_event.cpp @@ -1,14 +1,14 @@ -#include "common.hpp" -#include "pybind11/stl.h" +#include +#include -#include "tooling/router_event.hpp" -#include "tooling/dht_event.hpp" -#include "tooling/path_event.hpp" -#include "tooling/rc_event.hpp" -#include "tooling/peer_stats_event.hpp" +#include +#include +#include +#include +#include -#include -#include +#include +#include namespace tooling { diff --git a/pybind/llarp/tooling/router_hive.cpp b/pybind/llarp/tooling/router_hive.cpp index b5c23d825..cae413113 100644 --- a/pybind/llarp/tooling/router_hive.cpp +++ b/pybind/llarp/tooling/router_hive.cpp @@ -1,10 +1,10 @@ -#include "common.hpp" -#include "pybind11/stl.h" -#include "pybind11/iostream.h" +#include +#include +#include -#include -#include "router/abstractrouter.hpp" -#include "llarp.hpp" +#include +#include +#include namespace tooling { diff --git a/pybind/module.cpp b/pybind/module.cpp index 605d83844..ae32bd2b9 100644 --- a/pybind/module.cpp +++ b/pybind/module.cpp @@ -1,5 +1,5 @@ #include "common.hpp" -#include "util/logging/logger.hpp" +#include PYBIND11_MODULE(pyllarp, m) {