summaryrefslogtreecommitdiff
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
parentb195ac27e8234160b29698802deccd109a6fdc25 (diff)
downloadtmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.gz
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.bz2
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.tar.xz
tmwa-1cc5fee5904832da6564f12c858423fd5bd1b2b6.zip
Make travis happy
-rw-r--r--src/admin/ladmin.cpp5
-rw-r--r--src/admin/ladmin.hpp2
-rw-r--r--src/char/char.cpp4
-rw-r--r--src/char/inter.hpp2
-rw-r--r--src/compat/attr.hpp2
-rw-r--r--src/compat/cast.hpp2
-rw-r--r--src/compat/fun.hpp5
-rw-r--r--src/compat/iter.hpp2
-rw-r--r--src/compat/memory.hpp2
-rw-r--r--src/compat/nullpo.hpp2
-rw-r--r--src/compat/rawmem.hpp2
-rw-r--r--src/conf/version.hpp2
-rw-r--r--src/generic/db.hpp2
-rw-r--r--src/generic/intern-pool.hpp2
-rw-r--r--src/generic/matrix.hpp2
-rw-r--r--src/generic/md5.hpp2
-rw-r--r--src/generic/operators.hpp2
-rw-r--r--src/generic/random.hpp4
-rw-r--r--src/generic/random.t.hpp2
-rw-r--r--src/generic/random2.hpp2
-rw-r--r--src/ints/cmp.hpp3
-rw-r--r--src/ints/udl.hpp2
-rw-r--r--src/ints/udl_test.cpp584
-rw-r--r--src/ints/wrap.hpp10
-rw-r--r--src/io/cxxstdio.hpp2
-rw-r--r--src/io/fd.hpp2
-rw-r--r--src/io/line.hpp2
-rw-r--r--src/io/lock.hpp2
-rw-r--r--src/io/read.hpp2
-rw-r--r--src/io/tty.hpp2
-rw-r--r--src/login/login.cpp6
-rw-r--r--src/login/login.hpp2
-rw-r--r--src/map/chrif.cpp2
-rw-r--r--src/map/clif.cpp2
-rw-r--r--src/map/clif.t.hpp2
-rw-r--r--src/map/grfio.hpp2
-rw-r--r--src/map/magic-expr-eval.hpp2
-rw-r--r--src/map/magic-expr.hpp2
-rw-r--r--src/map/magic-interpreter-aux.hpp2
-rw-r--r--src/map/magic-interpreter-base.hpp2
-rw-r--r--src/map/magic-interpreter.t.hpp2
-rw-r--r--src/map/magic-stmt.hpp2
-rw-r--r--src/map/magic-v2.hpp2
-rw-r--r--src/map/map.t.hpp2
-rw-r--r--src/map/mapflag.hpp2
-rw-r--r--src/map/mob.t.hpp2
-rw-r--r--src/map/path.hpp2
-rw-r--r--src/map/pc.t.hpp2
-rw-r--r--src/map/skill-pools.hpp2
-rw-r--r--src/map/skill.t.hpp2
-rw-r--r--src/map/tmw.hpp2
-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
-rw-r--r--src/poison.hpp4
-rw-r--r--src/range/slice.hpp3
-rw-r--r--src/sanity.hpp4
-rw-r--r--src/strings/all.hpp2
-rw-r--r--src/strings/mstring.hpp2
-rw-r--r--src/strings/rstring.hpp2
-rw-r--r--src/strings/sstring.hpp2
-rw-r--r--src/strings/tstring.hpp2
-rw-r--r--src/strings/vstring.hpp4
-rw-r--r--src/strings/xstring.hpp2
-rw-r--r--src/strings/zstring.hpp2
-rw-r--r--src/warnings.hpp23
73 files changed, 410 insertions, 393 deletions
diff --git a/src/admin/ladmin.cpp b/src/admin/ladmin.cpp
index a4c2464..c078104 100644
--- a/src/admin/ladmin.cpp
+++ b/src/admin/ladmin.cpp
@@ -260,6 +260,7 @@ TString parameters; // needs to be global since it's passed to the parse functio
// really should be added to session data
static
AccountId list_first, list_last;
+static
int list_type, list_count; // parameter to display a list of accounts
static
int already_exit_function = 0; // sometimes, the exit function is called twice... so, don't log twice the message
@@ -286,7 +287,7 @@ void ladmin_log(XString line)
log_with_timestamp(logfp, line);
}
-static
+static __attribute__((noreturn))
void delete_fromlogin(Session *)
{
{
@@ -2770,7 +2771,7 @@ int Connect_login_server(void)
Iprintf("Attempt to connect to login-server...\n"_fmt);
LADMIN_LOG("Attempt to connect to login-server...\n"_fmt);
- login_session = make_connection(login_ip, login_port, SessionParsers{func_parse: parse_fromlogin, func_delete: delete_fromlogin});
+ login_session = make_connection(login_ip, login_port, SessionParsers{.func_parse= parse_fromlogin, .func_delete= delete_fromlogin});
if (!login_session)
return 0;
diff --git a/src/admin/ladmin.hpp b/src/admin/ladmin.hpp
index 034f644..06580eb 100644
--- a/src/admin/ladmin.hpp
+++ b/src/admin/ladmin.hpp
@@ -19,6 +19,6 @@
// 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"
#endif // TMWA_ADMIN_LADMIN_HPP
diff --git a/src/char/char.cpp b/src/char/char.cpp
index f714dda..09d4a36 100644
--- a/src/char/char.cpp
+++ b/src/char/char.cpp
@@ -2474,7 +2474,7 @@ void parse_char(Session *s)
{
int len;
WFIFOB(s, 2) = 0;
- s->set_parsers(SessionParsers{func_parse: parse_frommap, func_delete: delete_frommap});
+ s->set_parsers(SessionParsers{.func_parse= parse_frommap, .func_delete= delete_frommap});
server_session[i] = s;
if (anti_freeze_enable)
server_freezeflag[i] = 5; // Map anti-freeze system. Counter. 5 ok, 4...0 freezed
@@ -2612,7 +2612,7 @@ void check_connect_login_server(TimerData *, tick_t)
{
PRINTF("Attempt to connect to login-server...\n"_fmt);
login_session = make_connection(login_ip, login_port,
- SessionParsers{func_parse: parse_tologin, func_delete: delete_tologin});
+ SessionParsers{.func_parse= parse_tologin, .func_delete= delete_tologin});
if (!login_session)
return;
realloc_fifo(login_session, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
diff --git a/src/char/inter.hpp b/src/char/inter.hpp
index 7d1a38b..e7a4317 100644
--- a/src/char/inter.hpp
+++ b/src/char/inter.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 "../strings/fwd.hpp"
diff --git a/src/compat/attr.hpp b/src/compat/attr.hpp
index ea7ba86..531e6b4 100644
--- a/src/compat/attr.hpp
+++ b/src/compat/attr.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"
# ifdef __clang__
diff --git a/src/compat/cast.hpp b/src/compat/cast.hpp
index 8db486f..b237df4 100644
--- a/src/compat/cast.hpp
+++ b/src/compat/cast.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 <utility>
# include <type_traits>
diff --git a/src/compat/fun.hpp b/src/compat/fun.hpp
index 005f2c5..072bda0 100644
--- a/src/compat/fun.hpp
+++ b/src/compat/fun.hpp
@@ -19,13 +19,10 @@
// 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 <functional>
-# include "../sanity.hpp"
-
-
namespace ph = std::placeholders;
#endif // TMWA_COMPAT_FUN_HPP
diff --git a/src/compat/iter.hpp b/src/compat/iter.hpp
index 7793d90..130bdf9 100644
--- a/src/compat/iter.hpp
+++ b/src/compat/iter.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 <iterator>
diff --git a/src/compat/memory.hpp b/src/compat/memory.hpp
index 2c0f742..8cafcb4 100644
--- a/src/compat/memory.hpp
+++ b/src/compat/memory.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 <memory>
diff --git a/src/compat/nullpo.hpp b/src/compat/nullpo.hpp
index 75f8110..d6e39a5 100644
--- a/src/compat/nullpo.hpp
+++ b/src/compat/nullpo.hpp
@@ -41,7 +41,7 @@
# define nullpo_ret(t) nullpo_retr(0, t)
# define nullpo_retv(t) nullpo_retr(, t)
-# include "../sanity.hpp"
+# include "fwd.hpp"
/// Used by macros in this header
bool nullpo_chk(const char *file, int line, const char *func,
diff --git a/src/compat/rawmem.hpp b/src/compat/rawmem.hpp
index bbe917c..f030963 100644
--- a/src/compat/rawmem.hpp
+++ b/src/compat/rawmem.hpp
@@ -23,7 +23,7 @@
# include <cstdint>
# include <cstring>
-# include "../sanity.hpp"
+# include "fwd.hpp"
inline
void really_memcpy(uint8_t *dest, const uint8_t *src, size_t n)
diff --git a/src/conf/version.hpp b/src/conf/version.hpp
index ea394e6..56c12e0 100644
--- a/src/conf/version.hpp
+++ b/src/conf/version.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"
+// just mention "fwd.hpp" to make formatter happy
# include "conf-raw/str-VERSION_FULL.h"
# include "conf-raw/str-VERSION_HASH.h"
diff --git a/src/generic/db.hpp b/src/generic/db.hpp
index 314c449..0eac890 100644
--- a/src/generic/db.hpp
+++ b/src/generic/db.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 <map>
# include <memory>
diff --git a/src/generic/intern-pool.hpp b/src/generic/intern-pool.hpp
index 0ffddd2..b9fc38c 100644
--- a/src/generic/intern-pool.hpp
+++ b/src/generic/intern-pool.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 <cassert>
diff --git a/src/generic/matrix.hpp b/src/generic/matrix.hpp
index 40ff9a8..fb18a4c 100644
--- a/src/generic/matrix.hpp
+++ b/src/generic/matrix.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 <cassert>
diff --git a/src/generic/md5.hpp b/src/generic/md5.hpp
index 8b1c6ad..071c08b 100644
--- a/src/generic/md5.hpp
+++ b/src/generic/md5.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/generic/operators.hpp b/src/generic/operators.hpp
index 2a71c46..ca9311a 100644
--- a/src/generic/operators.hpp
+++ b/src/generic/operators.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"
namespace _operators
{
diff --git a/src/generic/random.hpp b/src/generic/random.hpp
index 45b5371..2fb2632 100644
--- a/src/generic/random.hpp
+++ b/src/generic/random.hpp
@@ -19,11 +19,11 @@
// 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 "random.t.hpp"
-# include "../sanity.hpp"
+# include "fwd.hpp"
# include <random>
diff --git a/src/generic/random.t.hpp b/src/generic/random.t.hpp
index d26bf56..b20cb64 100644
--- a/src/generic/random.t.hpp
+++ b/src/generic/random.t.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"
namespace random_
{
diff --git a/src/generic/random2.hpp b/src/generic/random2.hpp
index 40fcbcf..47e4222 100644
--- a/src/generic/random2.hpp
+++ b/src/generic/random2.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 "random.hpp"
diff --git a/src/ints/cmp.hpp b/src/ints/cmp.hpp
index e0e819b..de6a5f2 100644
--- a/src/ints/cmp.hpp
+++ b/src/ints/cmp.hpp
@@ -25,6 +25,8 @@
namespace ints
{
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wtype-limits"
template<class T, class U>
T saturate(const U& v)
{
@@ -58,6 +60,7 @@ namespace ints
return v;
}
}
+# pragma GCC diagnostic pop
} // namespace ints
using ints::saturate;
diff --git a/src/ints/udl.hpp b/src/ints/udl.hpp
index ecb5478..caed16b 100644
--- a/src/ints/udl.hpp
+++ b/src/ints/udl.hpp
@@ -122,7 +122,7 @@ namespace ints
template<class T>
constexpr
- operator T()
+ operator T() const
{
typedef typename std::make_unsigned<T>::type U;
// boo, body of constexpr function can't use variables
diff --git a/src/ints/udl_test.cpp b/src/ints/udl_test.cpp
index 3bcbaad..acb4f76 100644
--- a/src/ints/udl_test.cpp
+++ b/src/ints/udl_test.cpp
@@ -30,439 +30,439 @@ TEST(ints, smc)
{
{
ints::SignedMagnitudeConstant<false, 0> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7e> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7e> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7f> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7f> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x80> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x80> i;
- static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ (void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xfe> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xfe> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xff> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ (void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xff> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false,0x100> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x100> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7ffe> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7ffe> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7fff> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7fff> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x8000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x8000> i;
- //static_cast<int8_t>(i);
- static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ (void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xfffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xfffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ (void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false,0x10000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x10000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7ffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7ffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7fffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7fffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x80000000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x80000000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ (void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xfffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xfffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xffffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ (void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xffffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false,0x100000000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- //static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ //(void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x100000000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7ffffffffffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- //static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ //(void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7ffffffffffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x7fffffffffffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- //static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ //(void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x7fffffffffffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0x8000000000000000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- //static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- //static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ //(void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ //(void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0x8000000000000000> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ (void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xfffffffffffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- //static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- //static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ //(void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ //(void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xfffffffffffffffe> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- //static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ //(void)static_cast<int64_t>(i);
}
{
ints::SignedMagnitudeConstant<false, 0xffffffffffffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- //static_cast<int64_t>(i);
- //static_cast<uint8_t>(i);
- //static_cast<uint16_t>(i);
- //static_cast<uint32_t>(i);
- static_cast<uint64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ //(void)static_cast<int64_t>(i);
+ //(void)static_cast<uint8_t>(i);
+ //(void)static_cast<uint16_t>(i);
+ //(void)static_cast<uint32_t>(i);
+ (void)static_cast<uint64_t>(i);
}
{
ints::SignedMagnitudeConstant<true, 0xffffffffffffffff> i;
- //static_cast<int8_t>(i);
- //static_cast<int16_t>(i);
- //static_cast<int32_t>(i);
- //static_cast<int64_t>(i);
+ //(void)static_cast<int8_t>(i);
+ //(void)static_cast<int16_t>(i);
+ //(void)static_cast<int32_t>(i);
+ //(void)static_cast<int64_t>(i);
}
{
//ints::SignedMagnitudeConstant<false,0x10000000000000000> i;
diff --git a/src/ints/wrap.hpp b/src/ints/wrap.hpp
index b25a1ad..71f2673 100644
--- a/src/ints/wrap.hpp
+++ b/src/ints/wrap.hpp
@@ -45,17 +45,17 @@ namespace ints
bool operator !() const { return !_value; }
};
- template<class W>
+ template<class W, typename=typename W::wrapped_type>
bool operator == (W l, W r)
{
return l._value == r._value;
}
- template<class W>
+ template<class W, typename=typename W::wrapped_type>
bool operator != (W l, W r)
{
return l._value != r._value;
}
- template<class W>
+ template<class W, typename=typename W::wrapped_type>
bool operator < (W l, W r)
{
return l._value < r._value;
@@ -74,8 +74,8 @@ namespace ints
struct Sub : T
{
constexpr
- Sub(typename T::wrapped_type v)
- : T(v)
+ Sub(typename T::wrapped_type v2)
+ : T(v2)
{}
};
return Sub(v);
diff --git a/src/io/cxxstdio.hpp b/src/io/cxxstdio.hpp
index 479707a..65d32cd 100644
--- a/src/io/cxxstdio.hpp
+++ b/src/io/cxxstdio.hpp
@@ -101,7 +101,9 @@ namespace cxxstdio
return v;
}
+ inline
const char *convert_for_printf(const char *) = delete;
+ inline
char *convert_for_scanf(char *) = delete;
# if 0
diff --git a/src/io/fd.hpp b/src/io/fd.hpp
index 7afb40f..cf91ed1 100644
--- a/src/io/fd.hpp
+++ b/src/io/fd.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 <sys/select.h>
# include <sys/socket.h>
diff --git a/src/io/line.hpp b/src/io/line.hpp
index bb002b8..fb1984d 100644
--- a/src/io/line.hpp
+++ b/src/io/line.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/rstring.hpp"
# include "../strings/astring.hpp"
diff --git a/src/io/lock.hpp b/src/io/lock.hpp
index b879da5..ec8a82e 100644
--- a/src/io/lock.hpp
+++ b/src/io/lock.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 "write.hpp"
diff --git a/src/io/read.hpp b/src/io/read.hpp
index f99fb56..3816294 100644
--- a/src/io/read.hpp
+++ b/src/io/read.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/io/tty.hpp b/src/io/tty.hpp
index 97487b8..b6eb227 100644
--- a/src/io/tty.hpp
+++ b/src/io/tty.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"
# define SGR_BLACK "\e[30m"
diff --git a/src/login/login.cpp b/src/login/login.cpp
index e7de1ae..6831b19 100644
--- a/src/login/login.cpp
+++ b/src/login/login.cpp
@@ -2995,7 +2995,7 @@ void parse_login(Session *s)
WFIFOW(s, 0) = 0x2711;
WFIFOB(s, 2) = 0;
WFIFOSET(s, 3);
- s->set_parsers(SessionParsers{func_parse: parse_fromchar, func_delete: delete_fromchar});
+ s->set_parsers(SessionParsers{.func_parse= parse_fromchar, .func_delete= delete_fromchar});
realloc_fifo(s, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
// send GM account to char-server
len = 4;
@@ -3069,7 +3069,7 @@ void parse_login(Session *s)
password, ip);
PRINTF("Connection of a remote administration accepted (non encrypted password).\n"_fmt);
WFIFOB(s, 2) = 0;
- s->set_parsers(SessionParsers{func_parse: parse_admin, func_delete: delete_admin});
+ s->set_parsers(SessionParsers{.func_parse= parse_admin, .func_delete= delete_admin});
}
else if (admin_state != 1)
LOGIN_LOG("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (non encrypted password: %s, ip: %s)\n"_fmt,
@@ -3872,7 +3872,7 @@ int do_init(Slice<ZString> argv)
read_gm_account();
mmo_auth_init();
// set_termfunc (mmo_auth_sync);
- login_session = make_listen_port(login_port, SessionParsers{func_parse: parse_login, func_delete: delete_login});
+ login_session = make_listen_port(login_port, SessionParsers{.func_parse= parse_login, .func_delete= delete_login});
Timer(gettick() + std::chrono::minutes(5),
diff --git a/src/login/login.hpp b/src/login/login.hpp
index 3458dab..9c17c55 100644
--- a/src/login/login.hpp
+++ b/src/login/login.hpp
@@ -19,6 +19,6 @@
// 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"
#endif // TMWA_LOGIN_LOGIN_HPP
diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp
index 88fb039..3c2ac63 100644
--- a/src/map/chrif.cpp
+++ b/src/map/chrif.cpp
@@ -1210,7 +1210,7 @@ void check_connect_char_server(TimerData *, tick_t)
PRINTF("Attempt to connect to char-server...\n"_fmt);
chrif_state = 0;
char_session = make_connection(char_ip, char_port,
- SessionParsers{func_parse: chrif_parse, func_delete: chrif_delete});
+ SessionParsers{.func_parse= chrif_parse, .func_delete= chrif_delete});
if (!char_session)
return;
realloc_fifo(char_session, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index be544db..bdb8609 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -5482,5 +5482,5 @@ void clif_parse(Session *s)
void do_init_clif(void)
{
- make_listen_port(map_port, SessionParsers{func_parse: clif_parse, func_delete: clif_delete});
+ make_listen_port(map_port, SessionParsers{.func_parse= clif_parse, .func_delete= clif_delete});
}
diff --git a/src/map/clif.t.hpp b/src/map/clif.t.hpp
index 5cb06ad..2da6cde 100644
--- a/src/map/clif.t.hpp
+++ b/src/map/clif.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 <cstdint>
diff --git a/src/map/grfio.hpp b/src/map/grfio.hpp
index 9b6d5e2..3083f8c 100644
--- a/src/map/grfio.hpp
+++ b/src/map/grfio.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 <cstdint>
diff --git a/src/map/magic-expr-eval.hpp b/src/map/magic-expr-eval.hpp
index 9b9f5f8..e19c896 100644
--- a/src/map/magic-expr-eval.hpp
+++ b/src/map/magic-expr-eval.hpp
@@ -20,7 +20,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/map/magic-expr.hpp b/src/map/magic-expr.hpp
index 4d78bab..bbe8bbf 100644
--- a/src/map/magic-expr.hpp
+++ b/src/map/magic-expr.hpp
@@ -20,7 +20,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 "magic-interpreter.hpp"
diff --git a/src/map/magic-interpreter-aux.hpp b/src/map/magic-interpreter-aux.hpp
index 1369b38..0b78b58 100644
--- a/src/map/magic-interpreter-aux.hpp
+++ b/src/map/magic-interpreter-aux.hpp
@@ -20,7 +20,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 "magic-interpreter.t.hpp"
diff --git a/src/map/magic-interpreter-base.hpp b/src/map/magic-interpreter-base.hpp
index 9b1e08a..780ada4 100644
--- a/src/map/magic-interpreter-base.hpp
+++ b/src/map/magic-interpreter-base.hpp
@@ -19,6 +19,6 @@
// 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"
#endif // TMWA_MAP_MAGIC_INTERPRETER_BASE_HPP
diff --git a/src/map/magic-interpreter.t.hpp b/src/map/magic-interpreter.t.hpp
index 9310a7b..1fe5fa3 100644
--- a/src/map/magic-interpreter.t.hpp
+++ b/src/map/magic-interpreter.t.hpp
@@ -20,7 +20,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/enum.hpp"
diff --git a/src/map/magic-stmt.hpp b/src/map/magic-stmt.hpp
index 838854f..0e687a6 100644
--- a/src/map/magic-stmt.hpp
+++ b/src/map/magic-stmt.hpp
@@ -19,6 +19,6 @@
// 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"
#endif // TMWA_MAP_MAGIC_STMT_HPP
diff --git a/src/map/magic-v2.hpp b/src/map/magic-v2.hpp
index 888e183..92b6f4e 100644
--- a/src/map/magic-v2.hpp
+++ b/src/map/magic-v2.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/zstring.hpp"
diff --git a/src/map/map.t.hpp b/src/map/map.t.hpp
index d9e3c1f..d90bdab 100644
--- a/src/map/map.t.hpp
+++ b/src/map/map.t.hpp
@@ -586,7 +586,7 @@ struct NpcName : VString<23> {};
struct ScriptLabel : VString<23> {};
struct ItemName : VString<23> {};
-class BlockId : public Wrapped<uint32_t> { public: BlockId() : Wrapped<uint32_t>() {} protected: template<class... A> constexpr explicit BlockId(A... a) : Wrapped<uint32_t>(a...) {} };
+class BlockId : public Wrapped<uint32_t> { public: BlockId() : Wrapped<uint32_t>() {} protected: constexpr explicit BlockId(uint32_t a) : Wrapped<uint32_t>(a) {} };
inline
BlockId account_to_block(AccountId a) { return wrap<BlockId>(unwrap<AccountId>(a)); }
inline
diff --git a/src/map/mapflag.hpp b/src/map/mapflag.hpp
index e3a55f5..c8eec1d 100644
--- a/src/map/mapflag.hpp
+++ b/src/map/mapflag.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 "../mmo/extract.hpp" // TODO remove this (requires specializing the *other* half)
diff --git a/src/map/mob.t.hpp b/src/map/mob.t.hpp
index 37fd13e..5e056d5 100644
--- a/src/map/mob.t.hpp
+++ b/src/map/mob.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 <cstdint>
diff --git a/src/map/path.hpp b/src/map/path.hpp
index 47b9814..9bdb520 100644
--- a/src/map/path.hpp
+++ b/src/map/path.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 "map.hpp"
diff --git a/src/map/pc.t.hpp b/src/map/pc.t.hpp
index 65e1046..e022f3b 100644
--- a/src/map/pc.t.hpp
+++ b/src/map/pc.t.hpp
@@ -22,7 +22,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 <cstdint>
diff --git a/src/map/skill-pools.hpp b/src/map/skill-pools.hpp
index 6781907..28351b1 100644
--- a/src/map/skill-pools.hpp
+++ b/src/map/skill-pools.hpp
@@ -19,6 +19,6 @@
// 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"
#endif // TMWA_MAP_SKILL_POOLS_HPP
diff --git a/src/map/skill.t.hpp b/src/map/skill.t.hpp
index 4e30cba..b2ef2de 100644
--- a/src/map/skill.t.hpp
+++ b/src/map/skill.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 <cstdint>
diff --git a/src/map/tmw.hpp b/src/map/tmw.hpp
index 670599e..9b11d64 100644
--- a/src/map/tmw.hpp
+++ b/src/map/tmw.hpp
@@ -20,7 +20,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/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>
diff --git a/src/poison.hpp b/src/poison.hpp
index 0328825..53694c4 100644
--- a/src/poison.hpp
+++ b/src/poison.hpp
@@ -18,9 +18,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/>.
-# if 0
-# include "../sanity.hpp"
-# endif
+// just mention "fwd.hpp" to make formatter happy
// impossible(*) to use safely
// removed in C11
diff --git a/src/range/slice.hpp b/src/range/slice.hpp
index f645595..ce35acf 100644
--- a/src/range/slice.hpp
+++ b/src/range/slice.hpp
@@ -19,12 +19,11 @@
// 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 <cstddef>
# include <type_traits>
-
# include <vector>
template<class T>
diff --git a/src/sanity.hpp b/src/sanity.hpp
index 70ee8fe..88bb24b 100644
--- a/src/sanity.hpp
+++ b/src/sanity.hpp
@@ -19,9 +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/>.
-# if 0
-# include "../sanity.hpp"
-# endif
+// just mention "fwd.hpp" to make formatter happy
# ifndef __cplusplus
# error "Please compile in C++ mode"
diff --git a/src/strings/all.hpp b/src/strings/all.hpp
index 26079ed..c87a403 100644
--- a/src/strings/all.hpp
+++ b/src/strings/all.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 "base.hpp"
# include "mstring.hpp"
diff --git a/src/strings/mstring.hpp b/src/strings/mstring.hpp
index 8225d9e..2da6a78 100644
--- a/src/strings/mstring.hpp
+++ b/src/strings/mstring.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 <deque>
diff --git a/src/strings/rstring.hpp b/src/strings/rstring.hpp
index 1de4db0..1de3e87 100644
--- a/src/strings/rstring.hpp
+++ b/src/strings/rstring.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 <cstdarg>
# include <cstring>
diff --git a/src/strings/sstring.hpp b/src/strings/sstring.hpp
index 0594499..60fa4f3 100644
--- a/src/strings/sstring.hpp
+++ b/src/strings/sstring.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 "base.hpp"
# include "rstring.hpp"
diff --git a/src/strings/tstring.hpp b/src/strings/tstring.hpp
index 38f41cd..748af9e 100644
--- a/src/strings/tstring.hpp
+++ b/src/strings/tstring.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 "base.hpp"
# include "rstring.hpp"
diff --git a/src/strings/vstring.hpp b/src/strings/vstring.hpp
index 33dfb10..022347a 100644
--- a/src/strings/vstring.hpp
+++ b/src/strings/vstring.hpp
@@ -19,7 +19,9 @@
// 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 <cstdio>
# include "base.hpp"
diff --git a/src/strings/xstring.hpp b/src/strings/xstring.hpp
index ad7c40d..96929c7 100644
--- a/src/strings/xstring.hpp
+++ b/src/strings/xstring.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 "base.hpp"
# include "literal.hpp"
diff --git a/src/strings/zstring.hpp b/src/strings/zstring.hpp
index c75c7c9..3b651b9 100644
--- a/src/strings/zstring.hpp
+++ b/src/strings/zstring.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/warnings.hpp b/src/warnings.hpp
index 1ea0074..0b2358a 100644
--- a/src/warnings.hpp
+++ b/src/warnings.hpp
@@ -21,9 +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/>.
-#if 0
-# include "../sanity.hpp"
-#endif
+// just mention "fwd.hpp" to make formatter happy
// This file is currently targeted at:
// GCC 4.6 (incomplete due to bugs)
@@ -221,6 +219,18 @@ E("-Wbuiltin-macro-redefined")
//W("-Wc++11-compat")
I("-Wc++0x-compat")
+// I care about whether my code compiles with the standard as implemented
+// by certain compilers, not whether it matches with an *exact* standard.
+#ifdef __clang__
+# if __has_warning("-Wc++1y-extensions")
+IC("-Wc++1y-extensions")
+# else
+static_assert('E', "-Wc++1y-extensions not in this clang version");
+# endif
+#else
+static_assert('E', "-Wc++1y-extensions not in GCC");
+#endif
+
/// Warn about pointer casts which increase alignment
X("-Wcast-align")
@@ -355,6 +365,10 @@ EG47("-Wfree-nonheap-object")
// -Wgnu is a clang alias for -Wpedantic
+// Foo{x: y}
+EC("-Wgnu-designator")
+
+
/// Warn whenever type qualifiers are ignored.
E("-Wignored-qualifiers")
@@ -404,6 +418,9 @@ E("-Wmain")
/// Warn about maybe uninitialized automatic variables
EG47("-Wmaybe-uninitialized")
+// bitch about 'struct Foo' vs 'class Foo'
+IC("-Wmismatched-tags")
+
/// Warn about possibly missing braces around
/// initializers
// beware of things like std::array!