summaryrefslogtreecommitdiff
path: root/src/mmo
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-04-22 17:14:28 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-04-22 17:57:08 -0700
commit1cc5fee5904832da6564f12c858423fd5bd1b2b6 (patch)
treef9318cdd5f45acdd1aceef875de20a0c5b9bde6b /src/mmo
parentb195ac27e8234160b29698802deccd109a6fdc25 (diff)
downloadtmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.gz
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.bz2
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.xz
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.zip
Make travis happy
Diffstat (limited to 'src/mmo')
-rw-r--r--src/mmo/config_parse.hpp2
-rw-r--r--src/mmo/core.hpp2
-rw-r--r--src/mmo/dumb_ptr.hpp2
-rw-r--r--src/mmo/human_time_diff.hpp2
-rw-r--r--src/mmo/ids.hpp20
-rw-r--r--src/mmo/ip.hpp2
-rw-r--r--src/mmo/md5more.hpp2
-rw-r--r--src/mmo/socket.cpp8
-rw-r--r--src/mmo/timer.hpp2
-rw-r--r--src/mmo/timer.t.hpp2
10 files changed, 22 insertions, 22 deletions
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 <http://www.gnu.org/licenses/>.
-# 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 <http://www.gnu.org/licenses/>.
-# 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 <http://www.gnu.org/licenses/>.
-# include "../sanity.hpp"
+# include "fwd.hpp"
# include <cstring>
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 <http://www.gnu.org/licenses/>.
-# 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<uint16_t> { public: explicit operator bool() const = delete; bool operator !() const = delete; Species() : Wrapped<uint16_t>() {} protected: template<class... A> constexpr explicit Species(A... a) : Wrapped<uint16_t>(a...) {} };
+class Species : public Wrapped<uint16_t> { public: explicit operator bool() const = delete; bool operator !() const = delete; Species() : Wrapped<uint16_t>() {} protected: constexpr explicit Species(uint16_t a) : Wrapped<uint16_t>(a) {} };
-class AccountId : public Wrapped<uint32_t> { public: AccountId() : Wrapped<uint32_t>() {} protected: template<class... A> constexpr explicit AccountId(A... a) : Wrapped<uint32_t>(a...) {} };
-class CharId : public Wrapped<uint32_t> { public: CharId() : Wrapped<uint32_t>() {} protected: template<class... A> constexpr explicit CharId(A... a) : Wrapped<uint32_t>(a...) {} };
+class AccountId : public Wrapped<uint32_t> { public: AccountId() : Wrapped<uint32_t>() {} protected: constexpr explicit AccountId(uint32_t a) : Wrapped<uint32_t>(a) {} };
+class CharId : public Wrapped<uint32_t> { public: CharId() : Wrapped<uint32_t>() {} protected: constexpr explicit CharId(uint32_t a) : Wrapped<uint32_t>(a) {} };
// important note: slave mobs synthesize PartyId as -BlockId of master
-class PartyId : public Wrapped<uint32_t> { public: PartyId() : Wrapped<uint32_t>() {} protected: template<class... A> constexpr explicit PartyId(A... a) : Wrapped<uint32_t>(a...) {} };
-class ItemNameId : public Wrapped<uint16_t> { public: ItemNameId() : Wrapped<uint16_t>() {} protected: template<class... A> constexpr explicit ItemNameId(A... a) : Wrapped<uint16_t>(a...) {} };
+class PartyId : public Wrapped<uint32_t> { public: PartyId() : Wrapped<uint32_t>() {} protected: constexpr explicit PartyId(uint32_t a) : Wrapped<uint32_t>(a) {} };
+class ItemNameId : public Wrapped<uint16_t> { public: ItemNameId() : Wrapped<uint16_t>() {} protected: constexpr explicit ItemNameId(uint16_t a) : Wrapped<uint16_t>(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<class T>
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 <http://www.gnu.org/licenses/>.
-# include "../sanity.hpp"
+# include "fwd.hpp"
# include <netinet/in.h>
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 <http://www.gnu.org/licenses/>.
-# 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<Session>(
- 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<Session>(
- 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<Session>(
- 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 <http://www.gnu.org/licenses/>.
-# include "../sanity.hpp"
+# include "fwd.hpp"
# include <chrono>
# include <functional>