diff options
-rw-r--r-- | .travis.yml | 6 | ||||
-rw-r--r-- | Makefile.in | 6 | ||||
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | src/ints/wrap.hpp | 17 | ||||
-rw-r--r-- | src/map/script-fun.cpp | 15 | ||||
-rw-r--r-- | src/wire/packets.cpp | 1 |
6 files changed, 20 insertions, 31 deletions
diff --git a/.travis.yml b/.travis.yml index d857970..accc0ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,8 +57,8 @@ script: - mkdir build - cd build - git init - - echo ../configure --build=x86_64-linux-gnu --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi6` $EXTRA_CONFIGURE_ARGS - - ../configure --build=x86_64-linux-gnu --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi6` $EXTRA_CONFIGURE_ARGS + - echo ../configure --build=x86_64-linux-gnu --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi` $EXTRA_CONFIGURE_ARGS + - ../configure --build=x86_64-linux-gnu --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi` $EXTRA_CONFIGURE_ARGS - make -R -k -j2 - make -R -k -j2 test TESTER='valgrind --error-exitcode=1 --track-fds=yes' @@ -102,6 +102,8 @@ matrix: env: REAL_CC=gcc-4.8 REAL_CXX=g++-4.8 PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.8 DEBUGPACKAGE=libstdc++6-4.8-dbg - compiler: gcc env: REAL_CC=gcc-4.9 REAL_CXX=g++-4.9 PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.9 DEBUGPACKAGE=libstdc++6-4.9-dbg + - compiler: gcc + env: REAL_CC=gcc-5 REAL_CXX=g++-5 PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-5 DEBUGPACKAGE=libstdc++6-5-dbg - compiler: gcc env: REAL_CC=gcc-4.7 REAL_CXX=g++-4.7 PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.7 DEBUGPACKAGE=libstdc++6-4.8-dbg EXTRA_CONFIGURE_ARGS=--disable-warnings diff --git a/Makefile.in b/Makefile.in index 006594a..779ca04 100644 --- a/Makefile.in +++ b/Makefile.in @@ -47,7 +47,7 @@ GTEST_DIR = @GTEST_DIR@ GDB = @GDB@ ENABLE_WARNINGS = @ENABLE_WARNINGS@ -ENABLE_ABI6 = @ENABLE_ABI6@ +ENABLE_ABI = @ENABLE_ABI@ ENABLE_CYGWIN_HACKS = @ENABLE_CYGWIN_HACKS@ ENABLE_DEBUG = @ENABLE_DEBUG@ ENABLE_RPATH = @ENABLE_RPATH@ @@ -276,8 +276,8 @@ WARNINGS := -include ${SRC_DIR}/src/warnings.hpp endif # related to gdb bug 15801 -ifeq (${ENABLE_ABI6},yes) -CXXFLAGS += -fabi-version=6 +ifeq (${ENABLE_ABI},yes) +CXXFLAGS += -fabi-version=8 endif # This needs to edit CXX instead of CXXFLAGS in order to make @@ -50,7 +50,7 @@ class Configuration(Cxx, Install, ConfigHash, Templates): home = os.path.expanduser('~') self.add_alias('--user', ['--prefix=%s' % home, '--enable-rpath=relative'], help='alias for --prefix=$HOME --enable-rpath=relative', hidden=False) - self.add_alias('--dev', ['--user', '--enable-warnings', '--enable-abi6'], + self.add_alias('--dev', ['--user', '--enable-warnings', '--enable-abi'], help=None, hidden=False) def paths(self): @@ -66,8 +66,8 @@ class Configuration(Cxx, Install, ConfigHash, Templates): self.add_bool_feature('warnings', init='no', check=lambda build, ENABLE_WARNINGS: None, help='Enable warnings (for development)') - self.add_bool_feature('abi6', init='no', - check=lambda build, ENABLE_ABI6: None, + self.add_bool_feature('abi', init='no', + check=lambda build, ENABLE_ABI: None, help='Force a nonbuggy gcc ABI (for development)') self.add_bool_feature('cygwin-hacks', init='no', check=lambda build, ENABLE_CYGWIN_HACKS: None, diff --git a/src/ints/wrap.hpp b/src/ints/wrap.hpp index 707c787..25b03c1 100644 --- a/src/ints/wrap.hpp +++ b/src/ints/wrap.hpp @@ -64,6 +64,14 @@ namespace ints } template<class T> + struct Sub : T + { + constexpr + Sub(typename T::wrapped_type v2) + : T(v2) + {} + }; + template<class T> constexpr typename T::wrapped_type unwrap(typename std::enable_if<true, T>::type w) { @@ -73,14 +81,7 @@ namespace ints constexpr T wrap(typename T::wrapped_type v) { - struct Sub : T - { - constexpr - Sub(typename T::wrapped_type v2) - : T(v2) - {} - }; - return Sub(v); + return Sub<T>(v); } template<class W> diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index 3949627..8b797c2 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -66,21 +66,6 @@ namespace tmwa { namespace map { -static -Array<LString, 11> pos_str //= -{{ - "Head"_s, - "Body"_s, - "Left hand"_s, - "Right hand"_s, - "Robe"_s, - "Shoes"_s, - "Accessory 1"_s, - "Accessory 2"_s, - "Head 2"_s, - "Head 3"_s, - "Not Equipped"_s, -}}; #define AARG(n) (st->stack->stack_datav[st->start + 2 + (n)]) #define HARG(n) (st->end > st->start + 2 + (n)) diff --git a/src/wire/packets.cpp b/src/wire/packets.cpp index be06283..22a996a 100644 --- a/src/wire/packets.cpp +++ b/src/wire/packets.cpp @@ -76,6 +76,7 @@ void packet_dump(Session *s) if ((i & 15) == 0) FPRINTF(stderr, "%04X "_fmt, i); Byte rfifob_ib; + rfifob_ib.value = 0; packet_fetch(s, i, &rfifob_ib, 1); uint8_t rfifob_i = rfifob_ib.value; FPRINTF(stderr, "%02x "_fmt, rfifob_i); |