From 1cc5fee5904832da6564f12c858423fd5bd1b2b6 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 22 Apr 2014 17:14:28 -0700 Subject: Make travis happy --- src/mmo/config_parse.hpp | 2 +- src/mmo/core.hpp | 2 +- src/mmo/dumb_ptr.hpp | 2 +- src/mmo/human_time_diff.hpp | 2 +- src/mmo/ids.hpp | 20 ++++++++++---------- src/mmo/ip.hpp | 2 +- src/mmo/md5more.hpp | 2 +- src/mmo/socket.cpp | 8 ++++---- src/mmo/timer.hpp | 2 +- src/mmo/timer.t.hpp | 2 +- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'src/mmo') diff --git a/src/mmo/config_parse.hpp b/src/mmo/config_parse.hpp index dd1b79e..080f13c 100644 --- a/src/mmo/config_parse.hpp +++ b/src/mmo/config_parse.hpp @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include "../strings/fwd.hpp" diff --git a/src/mmo/core.hpp b/src/mmo/core.hpp index 5699045..99e41c8 100644 --- a/src/mmo/core.hpp +++ b/src/mmo/core.hpp @@ -21,7 +21,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include "../range/slice.hpp" diff --git a/src/mmo/dumb_ptr.hpp b/src/mmo/dumb_ptr.hpp index 9632945..aa17ecd 100644 --- a/src/mmo/dumb_ptr.hpp +++ b/src/mmo/dumb_ptr.hpp @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include diff --git a/src/mmo/human_time_diff.hpp b/src/mmo/human_time_diff.hpp index aace438..5552e2b 100644 --- a/src/mmo/human_time_diff.hpp +++ b/src/mmo/human_time_diff.hpp @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include "../strings/xstring.hpp" diff --git a/src/mmo/ids.hpp b/src/mmo/ids.hpp index 71164ff..3c5b1ba 100644 --- a/src/mmo/ids.hpp +++ b/src/mmo/ids.hpp @@ -25,13 +25,13 @@ # include "extract.hpp" -class Species : public Wrapped { public: explicit operator bool() const = delete; bool operator !() const = delete; Species() : Wrapped() {} protected: template constexpr explicit Species(A... a) : Wrapped(a...) {} }; +class Species : public Wrapped { public: explicit operator bool() const = delete; bool operator !() const = delete; Species() : Wrapped() {} protected: constexpr explicit Species(uint16_t a) : Wrapped(a) {} }; -class AccountId : public Wrapped { public: AccountId() : Wrapped() {} protected: template constexpr explicit AccountId(A... a) : Wrapped(a...) {} }; -class CharId : public Wrapped { public: CharId() : Wrapped() {} protected: template constexpr explicit CharId(A... a) : Wrapped(a...) {} }; +class AccountId : public Wrapped { public: AccountId() : Wrapped() {} protected: constexpr explicit AccountId(uint32_t a) : Wrapped(a) {} }; +class CharId : public Wrapped { public: CharId() : Wrapped() {} protected: constexpr explicit CharId(uint32_t a) : Wrapped(a) {} }; // important note: slave mobs synthesize PartyId as -BlockId of master -class PartyId : public Wrapped { public: PartyId() : Wrapped() {} protected: template constexpr explicit PartyId(A... a) : Wrapped(a...) {} }; -class ItemNameId : public Wrapped { public: ItemNameId() : Wrapped() {} protected: template constexpr explicit ItemNameId(A... a) : Wrapped(a...) {} }; +class PartyId : public Wrapped { public: PartyId() : Wrapped() {} protected: constexpr explicit PartyId(uint32_t a) : Wrapped(a) {} }; +class ItemNameId : public Wrapped { public: ItemNameId() : Wrapped() {} protected: constexpr explicit ItemNameId(uint16_t a) : Wrapped(a) {} }; class GmLevel { @@ -41,7 +41,7 @@ class GmLevel constexpr explicit GmLevel(uint32_t b) : bits(b) {} constexpr explicit - operator uint32_t() { return bits; } + operator uint32_t() const { return bits; } template explicit @@ -65,16 +65,16 @@ public: // the argument is the level of a command constexpr - bool satisfies(GmLevel perm) { return bits >= perm.bits; } + bool satisfies(GmLevel perm) const { return bits >= perm.bits; } // the argument is another player's gm level, for info commands constexpr - bool detects(GmLevel other) { return bits >= other.bits; } + bool detects(GmLevel other) const { return bits >= other.bits; } // the argument is another player's gm level, for aggressive commands constexpr - bool overwhelms(GmLevel other) { return bits >= other.bits; } + bool overwhelms(GmLevel other) const { return bits >= other.bits; } // the argument is another potential permission level constexpr - bool obsoletes(GmLevel plvl) { return bits >= plvl.bits; } + bool obsoletes(GmLevel plvl) const { return bits >= plvl.bits; } constexpr uint16_t get_public_word() const diff --git a/src/mmo/ip.hpp b/src/mmo/ip.hpp index a425710..c765308 100644 --- a/src/mmo/ip.hpp +++ b/src/mmo/ip.hpp @@ -19,7 +19,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include diff --git a/src/mmo/md5more.hpp b/src/mmo/md5more.hpp index b1da783..6884bee 100644 --- a/src/mmo/md5more.hpp +++ b/src/mmo/md5more.hpp @@ -21,7 +21,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include "../generic/md5.hpp" diff --git a/src/mmo/socket.cpp b/src/mmo/socket.cpp index 79857b1..8714062 100644 --- a/src/mmo/socket.cpp +++ b/src/mmo/socket.cpp @@ -228,7 +228,7 @@ void connect_client(Session *ls) fd.fcntl(F_SETFL, O_NONBLOCK); set_session(fd, make_unique( - SessionIO{func_recv: recv_to_fifo, func_send: send_from_fifo}, + SessionIO{.func_recv= recv_to_fifo, .func_send= send_from_fifo}, ls->for_inferior)); Session *s = get_session(fd); s->fd = fd; @@ -291,8 +291,8 @@ Session *make_listen_port(uint16_t port, SessionParsers inferior) readfds.set(fd); set_session(fd, make_unique( - SessionIO{func_recv: connect_client, func_send: nullptr}, - SessionParsers{func_parse: nullptr, func_delete: nothing_delete})); + SessionIO{.func_recv= connect_client, .func_send= nullptr}, + SessionParsers{.func_parse= nullptr, .func_delete= nothing_delete})); Session *s = get_session(fd); s->for_inferior = inferior; s->fd = fd; @@ -346,7 +346,7 @@ Session *make_connection(IP4Address ip, uint16_t port, SessionParsers parsers) readfds.set(fd); set_session(fd, make_unique( - SessionIO{func_recv: recv_to_fifo, func_send: send_from_fifo}, + SessionIO{.func_recv= recv_to_fifo, .func_send= send_from_fifo}, parsers)); Session *s = get_session(fd); s->fd = fd; diff --git a/src/mmo/timer.hpp b/src/mmo/timer.hpp index 363cf17..ddb559f 100644 --- a/src/mmo/timer.hpp +++ b/src/mmo/timer.hpp @@ -23,7 +23,7 @@ # include "timer.t.hpp" -# include "../sanity.hpp" +# include "fwd.hpp" # include "../strings/fwd.hpp" diff --git a/src/mmo/timer.t.hpp b/src/mmo/timer.t.hpp index 6066e7c..a1d05ef 100644 --- a/src/mmo/timer.t.hpp +++ b/src/mmo/timer.t.hpp @@ -21,7 +21,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -# include "../sanity.hpp" +# include "fwd.hpp" # include # include -- cgit v1.2.3-60-g2f50