build system: suppress a few other warnings here and there

This commit is contained in:
Michele Caini
2020-02-19 15:04:20 +01:00
parent 3c39cfe645
commit 7aaa6dd986
3 changed files with 7 additions and 5 deletions

View File

@@ -25,6 +25,7 @@ struct fnv1a_traits;
template<>
struct fnv1a_traits<std::uint32_t> {
using type = std::uint32_t;
static constexpr std::uint32_t offset = 2166136261;
static constexpr std::uint32_t prime = 16777619;
};
@@ -32,6 +33,7 @@ struct fnv1a_traits<std::uint32_t> {
template<>
struct fnv1a_traits<std::uint64_t> {
using type = std::uint64_t;
static constexpr std::uint64_t offset = 14695981039346656037ull;
static constexpr std::uint64_t prime = 1099511628211ull;
};
@@ -72,7 +74,7 @@ class basic_hashed_string {
auto value = traits_type::offset;
while(*curr != 0) {
value = (value ^ (*(curr++))) * traits_type::prime;
value = (value ^ static_cast<traits_type::type>(*(curr++))) * traits_type::prime;
}
return value;

View File

@@ -4,8 +4,8 @@
ENTT_API void update_position(entt::registry &registry) {
registry.view<position, velocity>().each([](auto &pos, auto &vel) {
pos.x += 16 * vel.dx;
pos.y += 16 * vel.dy;
pos.x += static_cast<int>(16 * vel.dx);
pos.y += static_cast<int>(16 * vel.dy);
});
}

View File

@@ -4,8 +4,8 @@
ENTT_API void update_position(entt::registry &registry) {
registry.view<position, velocity>().each([](auto &pos, auto &vel) {
pos.x += 16 * vel.dx;
pos.y += 16 * vel.dy;
pos.x += static_cast<int>(16 * vel.dx);
pos.y += static_cast<int>(16 * vel.dy);
});
}