From 7af4c5b5c561362cb1135ab504095ae667a9270a Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 27 Jun 2014 19:16:45 -0700 Subject: This is more reliable --- src/net/fwd.hpp | 7 ++----- src/net/ip.hpp | 15 ++++++--------- src/net/packets.hpp | 19 ++++++++----------- src/net/socket.hpp | 33 +++++++++++++++------------------ src/net/timer.hpp | 11 ++++------- src/net/timer.t.hpp | 17 +++++++---------- 6 files changed, 42 insertions(+), 60 deletions(-) (limited to 'src/net') diff --git a/src/net/fwd.hpp b/src/net/fwd.hpp index 2438ccf..2097772 100644 --- a/src/net/fwd.hpp +++ b/src/net/fwd.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_NET_FWD_HPP -#define TMWA_NET_FWD_HPP +#pragma once // net/fwd.hpp - list of type names for net lib // // Copyright © 2014 Ben Longbons @@ -19,7 +18,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +#include "../sanity.hpp" namespace tmwa @@ -32,5 +31,3 @@ class TimerData; enum class RecvResult; } // namespace tmwa - -#endif // TMWA_NET_FWD_HPP diff --git a/src/net/ip.hpp b/src/net/ip.hpp index 9afc691..e9e71f4 100644 --- a/src/net/ip.hpp +++ b/src/net/ip.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_NET_IP_HPP -#define TMWA_NET_IP_HPP +#pragma once // ip.hpp - classes to deal with IP addresses. // // Copyright © 2013 Ben Longbons @@ -19,14 +18,14 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "fwd.hpp" +#include "fwd.hpp" -# include +#include -# include -# include +#include +#include -# include "../strings/fwd.hpp" +#include "../strings/fwd.hpp" namespace tmwa @@ -165,5 +164,3 @@ bool extract(XString str, IP4Address *iv); bool extract(XString str, IP4Mask *iv); } // namespace tmwa - -#endif // TMWA_NET_IP_HPP diff --git a/src/net/packets.hpp b/src/net/packets.hpp index e025a63..5cc377c 100644 --- a/src/net/packets.hpp +++ b/src/net/packets.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_NET_PACKETS_HPP -#define TMWA_NET_PACKETS_HPP +#pragma once // packets.hpp - palatable socket buffer accessors // // Copyright © 2014 Ben Longbons @@ -19,20 +18,20 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "fwd.hpp" +#include "fwd.hpp" -# include +#include -# include "../compat/cast.hpp" +#include "../compat/cast.hpp" -# include "../ints/little.hpp" +#include "../ints/little.hpp" -# include "../io/fwd.hpp" +#include "../io/fwd.hpp" // TODO ordering violation, should invert -# include "../proto2/fwd.hpp" +#include "../proto2/fwd.hpp" -# include "socket.hpp" +#include "socket.hpp" namespace tmwa @@ -584,5 +583,3 @@ RecvResult recv_packet_repeatonly(Session *s, AString& repeat) return recv_vpacket(s, head, repeat); } } // namespace tmwa - -#endif // TMWA_NET_PACKETS_HPP diff --git a/src/net/socket.hpp b/src/net/socket.hpp index 64eaf1a..576ef85 100644 --- a/src/net/socket.hpp +++ b/src/net/socket.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_NET_SOCKET_HPP -#define TMWA_NET_SOCKET_HPP +#pragma once // socket.hpp - Network event system. // // Copyright © ????-2004 Athena Dev Teams @@ -21,28 +20,28 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "fwd.hpp" +#include "fwd.hpp" -# include +#include -# include +#include -# include +#include -# include "../compat/iter.hpp" -# include "../compat/rawmem.hpp" -# include "../compat/time_t.hpp" +#include "../compat/iter.hpp" +#include "../compat/rawmem.hpp" +#include "../compat/time_t.hpp" -# include "../strings/astring.hpp" -# include "../strings/vstring.hpp" -# include "../strings/xstring.hpp" +#include "../strings/astring.hpp" +#include "../strings/vstring.hpp" +#include "../strings/xstring.hpp" -# include "../generic/dumb_ptr.hpp" +#include "../generic/dumb_ptr.hpp" -# include "../io/fd.hpp" +#include "../io/fd.hpp" -# include "ip.hpp" -# include "timer.t.hpp" +#include "ip.hpp" +#include "timer.t.hpp" namespace tmwa @@ -176,5 +175,3 @@ void do_sendrecv(interval_t next); /// Call the parser function for every socket that has read data void do_parsepacket(void); } // namespace tmwa - -#endif // TMWA_NET_SOCKET_HPP diff --git a/src/net/timer.hpp b/src/net/timer.hpp index beda3bf..338e339 100644 --- a/src/net/timer.hpp +++ b/src/net/timer.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_NET_TIMER_HPP -#define TMWA_NET_TIMER_HPP +#pragma once // timer.hpp - Future event scheduler. // // Copyright © ????-2004 Athena Dev Teams @@ -21,11 +20,11 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "timer.t.hpp" +#include "timer.t.hpp" -# include "fwd.hpp" +#include "fwd.hpp" -# include "../strings/fwd.hpp" +#include "../strings/fwd.hpp" namespace tmwa @@ -50,5 +49,3 @@ tick_t file_modified(ZString name); /// Check if there are any events at all scheduled. bool has_timers(); } // namespace tmwa - -#endif // TMWA_NET_TIMER_HPP diff --git a/src/net/timer.t.hpp b/src/net/timer.t.hpp index 5961f51..e983e07 100644 --- a/src/net/timer.t.hpp +++ b/src/net/timer.t.hpp @@ -1,5 +1,4 @@ -#ifndef TMWA_NET_TIMER_T_HPP -#define TMWA_NET_TIMER_T_HPP +#pragma once // timer.t.hpp - Future event scheduler. // // Copyright © ????-2004 Athena Dev Teams @@ -21,16 +20,16 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "fwd.hpp" +#include "fwd.hpp" -# include +#include -# include -# include +#include +#include -# include "../ints/little.hpp" +#include "../ints/little.hpp" -# include "../generic/dumb_ptr.hpp" +#include "../generic/dumb_ptr.hpp" namespace tmwa @@ -141,5 +140,3 @@ public: bool operator !() { return !td; } }; } // namespace tmwa - -#endif // TMWA_NET_TIMER_T_HPP -- cgit v1.2.3-60-g2f50