Mercurial > malikania
changeset 184:eaf3cea01010
Client: fix g++ error
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 19 Oct 2018 20:30:16 +0200 |
parents | 387f6b0a5420 |
children | 975dffc6567a |
files | libclient/malikania/client/animation.hpp libclient/malikania/client/sdl_util.cpp tests/tools/tileset/main.cpp |
diffstat | 3 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libclient/malikania/client/animation.hpp Fri Oct 19 20:27:02 2018 +0200 +++ b/libclient/malikania/client/animation.hpp Fri Oct 19 20:30:16 2018 +0200 @@ -46,8 +46,8 @@ * \brief Delay between each frames. */ struct frame { - std::uint64_t cell{0U}; //!< sprite cell index - std::uint64_t delay{50U}; //!< delay in milliseconds + std::uint64_t cell{0U}; //!< sprite cell index + std::uint64_t delay{50U}; //!< delay in milliseconds }; /** @@ -55,8 +55,8 @@ */ using frame_list = std::vector<frame>; - sprite sprite; //!< sprite used - frame_list frames; //!< list of frames + mlk::client::sprite sprite; //!< sprite used + mlk::client::animation::frame_list frames; //!< list of frames }; } // !mlk::client
--- a/libclient/malikania/client/sdl_util.cpp Fri Oct 19 20:27:02 2018 +0200 +++ b/libclient/malikania/client/sdl_util.cpp Fri Oct 19 20:30:16 2018 +0200 @@ -72,9 +72,7 @@ break; } - if (position < 0LL) - position = 0LL; - else if (static_cast<std::uint64_t>(position) > data->length) + if (static_cast<std::uint64_t>(position) > data->length) position = data->length; return (data->position = position);
--- a/tests/tools/tileset/main.cpp Fri Oct 19 20:27:02 2018 +0200 +++ b/tests/tools/tileset/main.cpp Fri Oct 19 20:30:16 2018 +0200 @@ -43,7 +43,7 @@ }; for (const auto& t : list) { - const auto tileset = loader_.load_tileset(t); + auto tileset = loader_.load_tileset(t); BOOST_REQUIRE_EQUAL("worldmapchip5fo.png", tileset.image); BOOST_REQUIRE_EQUAL(32U, tileset.cell.width);