From ebcb562e70a10d17aa09e98aa16ebe8f4250df29 Mon Sep 17 00:00:00 2001 From: Merry Date: Sun, 10 Jul 2022 08:55:36 +0100 Subject: [PATCH] list: Avoid comparison of different signs --- include/oaknut/impl/list.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/oaknut/impl/list.hpp b/include/oaknut/impl/list.hpp index 67eb355..79cc99e 100644 --- a/include/oaknut/impl/list.hpp +++ b/include/oaknut/impl/list.hpp @@ -63,11 +63,11 @@ private: bool verify(std::index_sequence, U... args) { if constexpr (std::is_base_of_v) { - return (((m_base.index() + indexes) % 32 == args.index()) && ...); + return (((m_base.index() + indexes) % 32 == static_cast(args.index())) && ...); } else if constexpr (std::is_base_of_v) { - return (((m_base.reg_index() + indexes) % 32 == args.reg_index() && m_base.elem_index() == args.elem_index()) && ...); + return (((m_base.reg_index() + indexes) % 32 == static_cast(args.reg_index()) && m_base.elem_index() == args.elem_index()) && ...); } else { - return (((m_base.reg_index() + indexes) % 32 == args.reg_index()) && ...); + return (((m_base.reg_index() + indexes) % 32 == static_cast(args.reg_index())) && ...); } }